diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-24 01:25:00 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-25 11:08:49 +0200 |
commit | 42e19643d20679eecc5feef7656065b95403b65b (patch) | |
tree | ad93fe4947d4cd1d03a7ed4b4839fd2ea1adc60b /examples | |
parent | 0a0a19e09bfdfd98544bdb987d01b0a3ae67e334 (diff) |
WaE: set but unused variables in tests
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cppunittest/TestAssertTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/cppunittest/TestAssertTest.cpp b/examples/cppunittest/TestAssertTest.cpp index 3960b8e..cd36fd0 100644 --- a/examples/cppunittest/TestAssertTest.cpp +++ b/examples/cppunittest/TestAssertTest.cpp @@ -49,6 +49,8 @@ TestAssertTest::testAssertThrow() { int x; CPPUNIT_ASSERT_THROW( x = 1234, std::string ); + // prevent warning + x += 1; } catch ( CPPUNIT_NS::Exception & ) { @@ -64,6 +66,8 @@ TestAssertTest::testAssertNoThrow() { int x; CPPUNIT_ASSERT_NO_THROW( x = 1234 ); + // prevent warning + x += 1; try { @@ -86,6 +90,8 @@ TestAssertTest::testAssertAssertionFail() { int x; CPPUNIT_ASSERT_ASSERTION_FAIL( x = 1234 ); + // prevent warning + x += 1; } catch ( CPPUNIT_NS::Exception & ) { @@ -101,6 +107,8 @@ TestAssertTest::testAssertAssertionPass() { int x; CPPUNIT_ASSERT_ASSERTION_PASS( x = 1234 ); + // prevent warning + x += 1; try { |