diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-09-14 13:01:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 13:01:20 +0200 |
commit | d2808b5a5128dd9e6631fb6e07da2fd500e161f7 (patch) | |
tree | f6d07860a9842e5b394316e2031828aa54e47150 /tests/test_validate_testing.h | |
parent | 7774ec1634374a2c6d10eba4d4c885688747deff (diff) | |
parent | a8cea5353f88d1dcc7c2c08600710844d9cd67e7 (diff) |
Merge pull request #52153 from timothyqiu/test-array-pop-at
Add unit tests for `Array.pop_at()`
Diffstat (limited to 'tests/test_validate_testing.h')
-rw-r--r-- | tests/test_validate_testing.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_validate_testing.h b/tests/test_validate_testing.h index f301047509..40b255e18a 100644 --- a/tests/test_validate_testing.h +++ b/tests/test_validate_testing.h @@ -34,6 +34,7 @@ #include "core/os/os.h" #include "tests/test_macros.h" +#include "tests/test_tools.h" TEST_SUITE("Validate tests") { TEST_CASE("Always pass") { @@ -182,6 +183,17 @@ TEST_SUITE("Validate tests") { // doctest string concatenation. CHECK_MESSAGE(true, var, " ", vec2, " ", rect2, " ", color); } + TEST_CASE("Detect error messages") { + ErrorDetector ed; + + REQUIRE_FALSE(ed.has_error); + + ERR_PRINT_OFF; + ERR_PRINT("Still waiting for Godot!"); + ERR_PRINT_ON; + + REQUIRE(ed.has_error); + } } #endif // TEST_VALIDATE_TESTING_H |