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.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/test_validate_testing.h b/tests/test_validate_testing.h
index 6d3eea724c..413a7e351d 100644
--- a/tests/test_validate_testing.h
+++ b/tests/test_validate_testing.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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") {
@@ -84,7 +85,7 @@ TEST_SUITE("Validate tests") {
Plane plane(Vector3(1, 1, 1), 1.0);
INFO(plane);
- Quat quat(Vector3(0.5, 1.0, 2.0));
+ Quaternion quat(Vector3(0.5, 1.0, 2.0));
INFO(quat);
AABB aabb(Vector3(), Vector3(100, 100, 100));
@@ -93,7 +94,7 @@ TEST_SUITE("Validate tests") {
Basis basis(quat);
INFO(basis);
- Transform trans(basis);
+ Transform3D trans(basis);
INFO(trans);
Color color(1, 0.5, 0.2, 0.3);
@@ -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