diff options
| author | Yong He <yonghe@outlook.com> | 2017-11-04 06:59:12 -0400 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2017-11-04 06:59:12 -0400 |
| commit | ba396cce3cc1ef7101055d5ef65c3d9c549c50d7 (patch) | |
| tree | 29df1d42548b75542a6d33e2462be0e2f96743a9 /tools | |
| parent | 76db3636418f1667db1c8b0d3b6cfec6c652cc84 (diff) | |
| parent | cc98fd4606222ec1d18878d5e8278dc32910076b (diff) | |
Merge https://github.com/shader-slang/slang
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/slang-test/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/slang-test/main.cpp b/tools/slang-test/main.cpp index 0ff6535b8..7cfa981ae 100644 --- a/tools/slang-test/main.cpp +++ b/tools/slang-test/main.cpp @@ -674,6 +674,7 @@ TestResult runSimpleTest(TestInput& input) // Otherwise we compare to the expected output if (actualOutput != expectedOutput) { + maybeDumpOutput(expectedOutput, actualOutput); result = kTestResult_Fail; } @@ -1147,6 +1148,14 @@ TestResult runComputeComparisonImpl(TestInput& input, const char * langOption, S } auto actualOutput = getOutput(spawner); + auto expectedOutput = getExpectedOutput(outputStem); + if (actualOutput != expectedOutput) + { + String actualOutputPath = outputStem + ".actual"; + Slang::File::WriteAllText(actualOutputPath, actualOutput); + + return kTestResult_Fail; + } // check against reference output if (!File::Exists(actualOutputFile)) |
