mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
![]() REJECT and ASSUME are useful for filtering out unwanted generated values. While this is not ideal, it is ocassionally useful and so we include it for convenience. The main loop of RANDOMIZED_TEST_CASE runs the test case 100 times, each time trying to generate a different set of values. Inside that loop, if it sees a REJECT (ASSUME is implemented in terms of REJECT), it retries up to 15 times before giving up (perhaps it's impossible or just very improbable to generate a value that will survive REJECT or ASSUME). REJECT("Reason for rejecting") will just outright fail, while ASSUME(bool) is more of an equivalent of a .filter() method from functional languages. |
||
---|---|---|
.. | ||
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 |