MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / RunTest

Method RunTest

Source/URLabEditor/Private/Tests/MjColorTests.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 "URLab.Color.Halton_Base2",
16 EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter)
17bool FMjColorHaltonBase2::RunTest(const FString& Parameters)
18{
19 const float Expected[] = {0.5f, 0.25f, 0.75f, 0.125f, 0.625f, 0.375f, 0.875f};
20 for (int32 i = 0; i < UE_ARRAY_COUNT(Expected); ++i)
21 {
22 const float V = MjColor::Halton(i + 1, 2);
23 TestTrue(FString::Printf(TEXT("Halton(%d,2) ~= %f"), i + 1, Expected[i]),
24 FMath::IsNearlyEqual(V, Expected[i], 1e-5f));
25 }
26 return true;
27}
28
29// Halton(0, base) must return 0 and never loop forever.
30IMPLEMENT_SIMPLE_AUTOMATION_TEST(FMjColorHaltonZero,

Callers

nothing calls this directly

Calls 4

HaltonFunction · 0.85
HSVToRGBFunction · 0.85
ApplySleepModulationFunction · 0.85
IslandColorFunction · 0.85

Tested by

no test coverage detected