diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-03-04 12:19:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-04 12:21:03 +0100 |
commit | d35eac83abff0a8860cd31c6e08b294e5ee8688f (patch) | |
tree | 13c5310bfba0831c35a37e688cebba52561f74aa /sal/qa/rtl | |
parent | 46c67c43236a8250e56d6af1a1caada73e8abb70 (diff) |
This is test code, OK to unconditionally print to stdout
...and where appropriate use CPPUNIT_ASSERT_EQUAL to have no need to always
print out certain values
Change-Id: Iad2ccb235b09852fffd3f010cf069c45b36e2d4b
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r-- | sal/qa/rtl/doublelock/rtl_doublelocking.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx index 8678ee069620..164e4a5186e1 100644 --- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx +++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx @@ -17,7 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -// include files +#include <sal/config.h> + +#include <iostream> #include <sal/types.h> @@ -190,24 +192,23 @@ namespace rtl_DoubleLocking sal_Int32 nValueOK2 = 0; nValueOK2 = p2Thread->getOK(); - SAL_INFO("sal.doublelock", "Value in Thread #1 is " << nValueOK); - SAL_INFO("sal.doublelock", "Value in Thread #2 is " << nValueOK2); + std::cout << "Value in Thread #1 is " << nValueOK << "\n"; + std::cout << "Value in Thread #2 is " << nValueOK2 << "\n"; sal_Int32 nValueFails = 0; nValueFails = pThread->getFails(); sal_Int32 nValueFails2 = 0; nValueFails2 = p2Thread->getFails(); - SAL_INFO("sal.doublelock", "Fails in Thread #1 is " << nValueFails); - SAL_INFO("sal.doublelock", "Fails in Thead #2 is " << nValueFails2); - delete pThread; delete p2Thread; CPPUNIT_ASSERT_MESSAGE( "getValue() failed, wrong value expected.", - nValueOK != 0 && nValueFails == 0 && nValueFails2 == 0 + nValueOK != 0 ); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nValueFails); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nValueFails2); } CPPUNIT_TEST_SUITE(getValue); |