summaryrefslogtreecommitdiff
path: root/tests/test.hpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-12 22:09:45 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-04-12 22:09:45 -0700
commit054b0b447eff82327c37a617849c3e20fbbb9789 (patch)
tree3055ee4603f8a05ca8dd04f8056573aac3cf4123 /tests/test.hpp
parent6c11a0c693da9ccf38225471d614bde162312427 (diff)
parent9539c488c29e7c2c06afa63abce70785cb5d15c5 (diff)
Merge branch 'master' into compact
Diffstat (limited to 'tests/test.hpp')
-rw-r--r--tests/test.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test.hpp b/tests/test.hpp
index 46c3330..d0fd0ca 100644
--- a/tests/test.hpp
+++ b/tests/test.hpp
@@ -143,9 +143,9 @@ struct dummy_fixture {};
#endif
#ifdef PUGIXML_NO_EXCEPTIONS
-#define CHECK_ALLOC_FAIL(code) CHECK(!test_runner::_memory_fail_triggered); code; CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false
+#define CHECK_ALLOC_FAIL(code) do { CHECK(!test_runner::_memory_fail_triggered); code; CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false; } while (test_runner::_memory_fail_triggered)
#else
-#define CHECK_ALLOC_FAIL(code) CHECK(!test_runner::_memory_fail_triggered); try { code; } catch (std::bad_alloc&) {} CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false
+#define CHECK_ALLOC_FAIL(code) do { CHECK(!test_runner::_memory_fail_triggered); try { code; } catch (std::bad_alloc&) {} CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false; } while (test_runner::_memory_fail_triggered)
#endif
#define STR(text) PUGIXML_TEXT(text)