diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-16 10:11:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-20 12:57:30 +0000 |
commit | c9cfc18edb9df04b1e30ab7478003175f7508352 (patch) | |
tree | b5f09caf8265079d9fe50c37008db97de727b303 /o3tl | |
parent | 0778689797eda887dd2f73fbcbed6b478633e734 (diff) |
callcatcher update list
Diffstat (limited to 'o3tl')
-rw-r--r-- | o3tl/inc/o3tl/cow_wrapper.hxx | 2 | ||||
-rw-r--r-- | o3tl/qa/test-cow_wrapper.cxx | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/o3tl/inc/o3tl/cow_wrapper.hxx b/o3tl/inc/o3tl/cow_wrapper.hxx index 143905a1ab89..0123bd6d1f1b 100644 --- a/o3tl/inc/o3tl/cow_wrapper.hxx +++ b/o3tl/inc/o3tl/cow_wrapper.hxx @@ -165,7 +165,7 @@ void cow_wrapper_client::modify( int nVal ) { maImpl->setValue( nVal ); } -void cow_wrapper_client::queryUnmodified() const +int cow_wrapper_client::queryUnmodified() const { return maImpl->getValue(); } diff --git a/o3tl/qa/test-cow_wrapper.cxx b/o3tl/qa/test-cow_wrapper.cxx index fa20573aad39..a91fc8e89b5a 100644 --- a/o3tl/qa/test-cow_wrapper.cxx +++ b/o3tl/qa/test-cow_wrapper.cxx @@ -97,16 +97,25 @@ public: { aTestObj1 = cow_wrapper_client1( 1 ); + CPPUNIT_ASSERT_EQUAL(aTestObj1.queryUnmodified(), 1); aTestObj2.modify( 2 ); + CPPUNIT_ASSERT_EQUAL(aTestObj2.queryUnmodified(), 2); aTestObj3.modify( 3 ); + CPPUNIT_ASSERT_EQUAL(aTestObj3.queryUnmodified(), 3); aTestObj4 = cow_wrapper_client2( 4 ); + CPPUNIT_ASSERT_EQUAL(aTestObj4.queryUnmodified(), 4); aTestObj5.modify( 5 ); + CPPUNIT_ASSERT_EQUAL(aTestObj5.queryUnmodified(), 5); aTestObj6.modify( 6 ); + CPPUNIT_ASSERT_EQUAL(aTestObj6.queryUnmodified(), 6); aTestObj7 = cow_wrapper_client3( 7 ); + CPPUNIT_ASSERT_EQUAL(aTestObj7.queryUnmodified(), 7); aTestObj8.modify( 8 ); + CPPUNIT_ASSERT_EQUAL(aTestObj8.queryUnmodified(), 8); aTestObj9.modify( 9 ); + CPPUNIT_ASSERT_EQUAL(aTestObj9.queryUnmodified(), 9); } // all three temporaries are dead now |