ladybird/Userland/Libraries/LibTest
ronak69 a42cf020ea LibTest: Return 0 if all test cases pass and 1 otherwise from TEST_MAIN
Before, TEST_MAIN used to return the return value of TestSuite::main()
function (which returns the number of test cases that did not pass, so
it can be >=256) directly.

The run-tests utility determines the success / failure of a test suite
binary by examining its (or i.e. TEST_MAIN's) exit status.

But as exit status values are supposed to be between 0 and 255, values
>=256 will get wrapped around (modulo 256), converting a return value of
256 to 0.

So, in a rare case where exactly 256 test cases are failing in your test
suite, run-tests utility will display that the test suite passed without
any failures.

Now, TEST_MAIN just returns 0 if all of the test cases pass and returns
1 otherwise.
2024-02-21 22:45:51 +01:00
..
Randomized LibTest: Add more numeric generators 2024-01-12 16:42:51 -07:00
CMakeLists.txt Everywhere: Resolve conflicts with LibC and libc++ 2023-06-27 12:40:38 +02:00
CrashTest.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
CrashTest.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JavaScriptTestRunner.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
JavaScriptTestRunnerMain.cpp LibFileSystem+Userland: Return ByteString from real_path() 2024-01-16 08:42:34 +00:00
Macros.h LibTest: Change #define-d constants into constexpr and a runtime flag 2023-10-27 12:26:06 -06:00
Results.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TestCase.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TestMain.cpp LibTest: Return 0 if all test cases pass and 1 otherwise from TEST_MAIN 2024-02-21 22:45:51 +01:00
TestResult.h LibTest: Add the REJECT and ASSUME macros 2023-10-26 17:26:52 -06:00
TestRunner.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TestRunnerUtil.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TestSuite.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TestSuite.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30