diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-02 09:23:03 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-02 09:23:03 +0200 |
commit | 6560116b67caa927b80b9c8c737f3ec0619847f4 (patch) | |
tree | b6b90ad2b0994524975067a355fefd324eb811d0 /AK/Tests | |
parent | 31793b8f3aaaa684134003a891ac642a5ed264a2 (diff) | |
download | serenity-6560116b67caa927b80b9c8c737f3ec0619847f4.zip |
TestSuite: Hijack the ASSERT macros during unit tests.
Instead of aborting the program when we hit an assertion, just print a
message and keep going.
This allows us to write tests that provoke assertions on purpose.
Diffstat (limited to 'AK/Tests')
-rw-r--r-- | AK/Tests/TestHashMap.cpp | 1 | ||||
-rw-r--r-- | AK/Tests/TestJSON.cpp | 1 | ||||
-rw-r--r-- | AK/Tests/TestQueue.cpp | 1 | ||||
-rw-r--r-- | AK/Tests/TestString.cpp | 1 | ||||
-rw-r--r-- | AK/Tests/TestVector.cpp | 3 |
5 files changed, 6 insertions, 1 deletions
diff --git a/AK/Tests/TestHashMap.cpp b/AK/Tests/TestHashMap.cpp index 06ada64459..1c17eab5ff 100644 --- a/AK/Tests/TestHashMap.cpp +++ b/AK/Tests/TestHashMap.cpp @@ -1,4 +1,5 @@ #include <AK/TestSuite.h> + #include <AK/AKString.h> #include <AK/HashMap.h> diff --git a/AK/Tests/TestJSON.cpp b/AK/Tests/TestJSON.cpp index 875ba6b99a..f101dd38a6 100644 --- a/AK/Tests/TestJSON.cpp +++ b/AK/Tests/TestJSON.cpp @@ -1,4 +1,5 @@ #include <AK/TestSuite.h> + #include <AK/AKString.h> #include <AK/HashMap.h> #include <AK/JsonArray.h> diff --git a/AK/Tests/TestQueue.cpp b/AK/Tests/TestQueue.cpp index 23d30f5de2..620f7f9634 100644 --- a/AK/Tests/TestQueue.cpp +++ b/AK/Tests/TestQueue.cpp @@ -1,4 +1,5 @@ #include <AK/TestSuite.h> + #include <AK/AKString.h> #include <AK/Queue.h> diff --git a/AK/Tests/TestString.cpp b/AK/Tests/TestString.cpp index a8a926d1ec..db0d1d947a 100644 --- a/AK/Tests/TestString.cpp +++ b/AK/Tests/TestString.cpp @@ -1,4 +1,5 @@ #include <AK/TestSuite.h> + #include <AK/AKString.h> TEST_CASE(construct_empty) diff --git a/AK/Tests/TestVector.cpp b/AK/Tests/TestVector.cpp index c2a5736f85..1405ccfb4a 100644 --- a/AK/Tests/TestVector.cpp +++ b/AK/Tests/TestVector.cpp @@ -1,6 +1,7 @@ +#include <AK/TestSuite.h> + #include <AK/AKString.h> #include <AK/OwnPtr.h> -#include <AK/TestSuite.h> #include <AK/Vector.h> TEST_CASE(construct) |