summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-29 23:18:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-02 11:08:27 +0100
commit88cf78d511c71af77658104a20c9c7a225c83078 (patch)
tree4c5f383e0e9c53c3e47d4740a79f6709f0e85213
parent546ee4db550d02bffcbe00934599885641257259 (diff)
make sure we get the right interim obj
-rw-r--r--sal/qa/OStringBuffer/rtl_OStringBuffer.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
index 036a2c395..172c436cb 100644
--- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
+++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
@@ -136,7 +136,7 @@ namespace rtl_OStringBuffer
CPPUNIT_ASSERT_MESSAGE
(
- "New OStringBuffer from Ostring",
+ "New OStringBuffer from OString",
aStrBuf.getStr() == aStrtmp &&
leg == aStrtmp.pData->length &&
aStrBuf.getCapacity() == leg+16
@@ -150,6 +150,21 @@ namespace rtl_OStringBuffer
rtl::OStringBuffer b2(b1);
}
+ void ctor_006()
+ {
+ //pass in a const char*, get a temp
+ //OString
+ ::rtl::OStringBuffer aStrBuf(kTestStr1);
+ sal_Int32 leg = aStrBuf.getLength();
+
+ CPPUNIT_ASSERT_MESSAGE
+ (
+ "New OStringBuffer from const char*",
+ leg == rtl_str_getLength(kTestStr1) &&
+ aStrBuf.getCapacity() == leg+16
+ );
+ }
+
CPPUNIT_TEST_SUITE(ctors);
CPPUNIT_TEST(ctor_001);
CPPUNIT_TEST(ctor_002);
@@ -157,6 +172,7 @@ namespace rtl_OStringBuffer
CPPUNIT_TEST(ctor_003_1);
CPPUNIT_TEST(ctor_004);
CPPUNIT_TEST(ctor_005);
+ CPPUNIT_TEST(ctor_006);
CPPUNIT_TEST_SUITE_END();
};