summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-11-19 00:19:29 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-11-19 00:19:29 -0800
commit5115db74091cf99054393a7132c46da544ee87e1 (patch)
tree719e200d66c956468c667b39b3a7b6e0b1f50f21 /tests
parent8df9f97cdaba7bd846c42321f9c2618c9e0ea12d (diff)
tests: Fix unused variable warning in some compilers
The variable is being assigned to but never read when exceptions are disabled.
Diffstat (limited to 'tests')
-rw-r--r--tests/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index 8eb55ed..712edda 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -190,13 +190,14 @@ int main(int, char** argv)
total++;
passed += run_test(test, test->_name, custom_allocate);
- #ifndef PUGIXML_NO_EXCEPTIONS
if (g_memory_fail_triggered)
{
+ // run tests that trigger memory failures twice - with an allocator that returns NULL and with an allocator that throws
+ #ifndef PUGIXML_NO_EXCEPTIONS
total++;
passed += run_test(test, (test->_name + std::string(" (throw)")).c_str(), custom_allocate_throw);
+ #endif
}
- #endif
}
unsigned int failed = total - passed;