mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
![]() Generators are callable as-is: u32 my_int = Gen::unsigned_int(); // -> 1, 5, 8, 3, 2 But there is little visibility in the test fail message into what went wrong. Showing what values were generated helps a lot, and that's what this macro does: GEN(my_int, Gen::unsigned_int()); expands into the above declaration and (crucially) a conditional warnln() call looking like "my_int = {}". It will only run if error reporting is enabled (see Test::can_report()), so it will only give the final shrunk value instead of spamming the output with each generated value. |
||
---|---|---|
.. | ||
Randomized | ||
CMakeLists.txt | ||
CrashTest.cpp | ||
CrashTest.h | ||
JavaScriptTestRunner.h | ||
JavaScriptTestRunnerMain.cpp | ||
Macros.h | ||
Results.h | ||
TestCase.h | ||
TestMain.cpp | ||
TestResult.h | ||
TestRunner.h | ||
TestRunnerUtil.h | ||
TestSuite.cpp | ||
TestSuite.h |