diff options
| -rw-r--r-- | tests/compute/generics-simple.slang.expected.txt | 8 | ||||
| -rw-r--r-- | tools/slang-test/main.cpp | 12 |
2 files changed, 14 insertions, 6 deletions
diff --git a/tests/compute/generics-simple.slang.expected.txt b/tests/compute/generics-simple.slang.expected.txt index fdaa30664..98798bd61 100644 --- a/tests/compute/generics-simple.slang.expected.txt +++ b/tests/compute/generics-simple.slang.expected.txt @@ -1,4 +1,4 @@ -0.0 -1.0 -2.0 -3.0
\ No newline at end of file +0 +3F800000 +40000000 +40400000
\ No newline at end of file diff --git a/tools/slang-test/main.cpp b/tools/slang-test/main.cpp index 676cb6875..cdea6b4dc 100644 --- a/tools/slang-test/main.cpp +++ b/tools/slang-test/main.cpp @@ -1168,8 +1168,16 @@ TestResult doComputeComparisonTestRunImpl(TestInput& input, const char * langOpt { auto reference = referenceProgramOutput[i]; auto actual = actualProgramOutput[i]; - if (actual != reference) - return kTestResult_Fail; + if (actual != reference) + { + // try to parse reference as float, and compare again + auto val = StringToFloat(reference); + auto uval = String((unsigned int)FloatAsInt(val), 16).ToUpper(); + if (actual != uval) + return kTestResult_Fail; + else + return kTestResult_Pass; + } } return kTestResult_Pass; } |
