summaryrefslogtreecommitdiff
path: root/tests/test_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_document.cpp')
-rw-r--r--tests/test_document.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index abc676e..35f3f7d 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -114,7 +114,9 @@ TEST(document_load_stream_exceptions)
try
{
doc.load(iss);
- CHECK((bool)!"exception should be thrown");
+
+ volatile bool exception_should_be_thrown = false; // to avoid 'controlling expression is constant' warning
+ CHECK(exception_should_be_thrown);
}
catch (const std::ios_base::failure&)
{