Skip to content

Commit d803bf7

Browse files
committed
enable -use-ir option when executing compute test cases.
1 parent 0ed248a commit d803bf7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/slang-test/main.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,7 @@ TestResult runComputeComparisonImpl(TestInput& input, const char * langOption, S
11371137
spawner.pushArgument("-o");
11381138
auto actualOutputFile = outputStem + ".actual.txt";
11391139
spawner.pushArgument(actualOutputFile);
1140+
spawner.pushArgument("-xslang -use-ir");
11401141

11411142
// clear the stale actual output file first. This will allow us to detect error if render-test fails and outputs nothing.
11421143
File::WriteAllText(actualOutputFile, "");
@@ -1183,8 +1184,8 @@ TestResult runComputeComparisonImpl(TestInput& input, const char * langOption, S
11831184
}
11841185
for (int i = 0; i < (int)referenceProgramOutput.Count(); i++)
11851186
{
1186-
auto reference = referenceProgramOutput[i];
1187-
auto actual = actualProgramOutput[i];
1187+
auto reference = String(referenceProgramOutput[i].Trim());
1188+
auto actual = String(actualProgramOutput[i].Trim());
11881189
if (actual != reference)
11891190
{
11901191
// try to parse reference as float, and compare again

0 commit comments

Comments
 (0)