summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibTest/Macros.h
AgeCommit message (Collapse)Author
2021-10-24LibTest: Introduce a macro to only compare truthinessTim Schumacher
2021-07-19Everywhere: Use AK/Math.h if applicableHendiadyoin1
AK's version should see better inlining behaviors, than the LibM one. We avoid mixed usage for now though. Also clean up some stale math includes and improper floatingpoint usage.
2021-06-11LibTest: Don't try to pass stderr to warnlnHendiadyoin1
2021-05-08LibTest: Expose new EXPECT_CRASH(..) macro for unit test assertionsBrian Gianforcaro
Utilize the Crash type we imported into LibTest to support testing of crash scenarios when testing all other components.
2021-04-29LibTest: Add EXPECT_NE(..) test assertion.Brian Gianforcaro
2021-04-27LibTest: Add FAIL() macro allow tests to force failure with message.Brian Gianforcaro
2021-04-25AK+Userland: Move AK/TestSuite.h into LibTest and rework Tests' CMakeAndrew Kaster
As many macros as possible are moved to Macros.h, while the macros to create a test case are moved to TestCase.h. TestCase is now the only user-facing header for creating a test case. TestSuite and its helpers have moved into a .cpp file. Instead of requiring a TEST_MAIN macro to be instantiated into the test file, a TestMain.cpp file is provided instead that will be linked against each test. This has the side effect that, if we wanted to have test cases split across multiple files, it's as simple as adding them all to the same executable. The test main should be portable to kernel mode as well, so if there's a set of tests that should be run in self-test mode in kernel space, we can accomodate that. A new serenity_test CMake function streamlines adding a new test with arguments for the test source file, subdirectory under /usr/Tests to install the test application and an optional list of libraries to link against the test application. To accomodate future test where the provided TestMain.cpp is not suitable (e.g. test-js), a CUSTOM_MAIN parameter can be passed to the function to not link against the boilerplate main function.