diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-09-28 15:20:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-09-28 15:20:54 +0200 |
commit | c0bdc26a36699adad06093ecdc87aa6843d82577 (patch) | |
tree | 0fe67c9629b7414f2566fd6f21c00786d7f47e6e /sal/qa | |
parent | f4a41769c6cf96da1b0272c50072609c6b354a97 (diff) |
Remove bogus unreliable test
Change-Id: I33ac62e10030a3d975f7644406025dbb5deb711e
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/rtl/oustring/rtl_OUString2.cxx | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx index eff33e9bc3ec..2f0b366bccc9 100644 --- a/sal/qa/rtl/oustring/rtl_OUString2.cxx +++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx @@ -894,14 +894,11 @@ public: int i; static const int nSequence = 4096; rtl::OUString *pStrs; - sal_uIntPtr *pValues; pStrs = new rtl::OUString[nSequence]; - pValues = new sal_uIntPtr[nSequence]; for (i = 0; i < nSequence; i++) { pStrs[i] = rtl::OUString::number( sqrt( static_cast<double>(i) ) ).intern(); - pValues[i] = reinterpret_cast<sal_uIntPtr>( pStrs[i].pData ); } for (i = 0; i < nSequence; i++) { @@ -909,27 +906,6 @@ public: CPPUNIT_ASSERT_MESSAGE("double intern failed", aNew.pData == pStrs[i].pData); } - - // Free strings to check for leaks - for (i = 0; i < nSequence; i++) - { - // Overwrite - hopefully this re-uses the memory - pStrs[i] = rtl::OUString(); - pStrs[i] = rtl::OUString::number( sqrt( static_cast<double>(i) ) ); - } - - for (i = 0; i < nSequence; i++) - { - rtl::OUString aIntern; - sal_uIntPtr nValue; - aIntern = rtl::OUString::number( sqrt( static_cast<double>(i) ) ).intern(); - - nValue = reinterpret_cast<sal_uIntPtr>( aIntern.pData ); - // This may not be 100% reliable: memory may - // have been re-used, but it's worth checking. - CPPUNIT_ASSERT_MESSAGE("intern leaking", nValue != pValues[i]); - } - delete [] pValues; delete [] pStrs; } |