summaryrefslogtreecommitdiff
path: root/tests/test_validate_testing.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_validate_testing.h')
-rw-r--r--tests/test_validate_testing.h12
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