diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-08-16 16:56:07 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-08-16 16:56:07 +0200 |
commit | c3fd8752d2f6e70e4553293a831e6e337cd2361e (patch) | |
tree | 146c2256a5504b6bb7f3a1b906c301aa2ec8122a /tests | |
parent | acc965c09c5f85d747dfcd4bfe7b88a621da92ef (diff) | |
parent | 3907e53ff68643785df0066be64fddce9f79919c (diff) | |
download | redot-engine-c3fd8752d2f6e70e4553293a831e6e337cd2361e.tar.gz |
Merge pull request #80612 from akien-mga/scons-disable-exception-handling
SCons: Disable C++ exception handling
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SCsub | 6 | ||||
-rw-r--r-- | tests/core/io/test_image.h | 6 | ||||
-rw-r--r-- | tests/scene/test_viewport.h | 2 |
3 files changed, 5 insertions, 9 deletions
diff --git a/tests/SCsub b/tests/SCsub index c59ce69b92..d96a1142e4 100644 --- a/tests/SCsub +++ b/tests/SCsub @@ -13,10 +13,8 @@ env_tests = env.Clone() if env_tests["platform"] == "windows": env_tests.Append(CPPDEFINES=[("DOCTEST_THREAD_LOCAL", "")]) -# Increase number of addressable sections in object files -# due to doctest's heavy use of templates and macros. -if env_tests.msvc: - env_tests.Append(CCFLAGS=["/bigobj"]) +if env["disable_exceptions"]: + env_tests.Append(CPPDEFINES=["DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS"]) env_tests.add_source_files(env.tests_sources, "*.cpp") diff --git a/tests/core/io/test_image.h b/tests/core/io/test_image.h index 92ab166ae8..1897971113 100644 --- a/tests/core/io/test_image.h +++ b/tests/core/io/test_image.h @@ -262,9 +262,7 @@ TEST_CASE("[Image] Modifying pixels of an image") { for (const Rect2i &rect : rects) { Ref<Image> img = memnew(Image(img_width, img_height, false, Image::FORMAT_RGBA8)); - CHECK_NOTHROW_MESSAGE( - img->fill_rect(rect, Color(1, 1, 1, 1)), - "fill_rect() shouldn't throw for any rect."); + img->fill_rect(rect, Color(1, 1, 1, 1)); for (int y = 0; y < img->get_height(); y++) { for (int x = 0; x < img->get_width(); x++) { if (rect.abs().has_point(Point2(x, y))) { @@ -317,7 +315,7 @@ TEST_CASE("[Image] Modifying pixels of an image") { // Pre-multiply Alpha then Convert from RGBA to L8, checking alpha { Ref<Image> gray_image = memnew(Image(3, 3, false, Image::FORMAT_RGBA8)); - CHECK_NOTHROW_MESSAGE(gray_image->fill_rect(Rect2i(0, 0, 3, 3), Color(1, 1, 1, 0)), "fill_rect() shouldn't throw for any rect."); + gray_image->fill_rect(Rect2i(0, 0, 3, 3), Color(1, 1, 1, 0)); gray_image->set_pixel(1, 1, Color(1, 1, 1, 1)); gray_image->set_pixel(1, 2, Color(0.5, 0.5, 0.5, 0.5)); gray_image->set_pixel(2, 1, Color(0.25, 0.05, 0.5, 1.0)); diff --git a/tests/scene/test_viewport.h b/tests/scene/test_viewport.h index ab17459a41..dd4786977e 100644 --- a/tests/scene/test_viewport.h +++ b/tests/scene/test_viewport.h @@ -226,7 +226,7 @@ TEST_CASE("[SceneTree][Viewport] Controls and InputEvent handling") { SUBCASE("[Viewport][GuiInputEvent] nullptr as argument doesn't lead to a crash.") { ERR_PRINT_OFF; - CHECK_NOTHROW(root->push_input(nullptr)); + root->push_input(nullptr); ERR_PRINT_ON; } |