Fixed intermittent unit test failures. (#7651)
The problem is that SurfacePoint doesn't have default values when constructed, and a few of the unit tests weren't setting m_position because the values weren't strictly needed for the test. However, the SurfacePointList checks them for validity and asserted when they couldn't be found, which was hit-and-miss due to it being uninitialized memory that was usually but not always 0xCCCCCCCC. Improved the assert message and set the position values everywhere. Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
@@ -108,6 +108,7 @@ namespace GradientSignal
|
||||
// Create a fake surface point with the position we're sampling.
|
||||
AzFramework::SurfaceData::SurfacePoint point;
|
||||
point.m_position = params.m_position;
|
||||
point.m_normal = AZ::Vector3::CreateAxisZ();
|
||||
SurfaceData::SurfacePointList pointList = AZStd::span<const AzFramework::SurfaceData::SurfacePoint>(&point, 1);
|
||||
|
||||
// Send it into the component, see what emerges
|
||||
|
||||
Reference in New Issue
Block a user