isl_test2.cc: print parsed expected result
authorSven Verdoolaege <sven@cerebras.net>
Thu, 24 Oct 2019 13:46:38 +0000 (24 15:46 +0200)
committerSven Verdoolaege <sven@cerebras.net>
Tue, 14 Feb 2023 21:32:19 +0000 (14 22:32 +0100)
That is, instead of printing the expected result directly
as the string stored in the test program,
print it in the same way as the obtained result.
In general, this makes it easier to see the difference.
For object types that need to be compared with "plain_is_equal",
it is also important to show the parsed expected result since
that may not be obviously equal to the original string.

Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
isl_test2.cc

index 51ce27e..c8497eb 100644 (file)
@@ -158,7 +158,7 @@ static void test(isl::ctx ctx, R (T::*fn)(A1) const, const std::string &name,
                ss << name << "(" << test.arg1 << ", " << test.arg2 << ") =\n"
                   << res << "\n"
                   << "expecting:\n"
-                  << test.res;
+                  << expected;
                THROW_INVALID(ss.str().c_str());
        }
 }