CPPUNIT_ASSERT_EQUAL disambiguation
Change-Id: I31d30627badb08469f7e0fd3ded957df78b58275
This commit is contained in:
@@ -25,49 +25,49 @@ private:
|
|||||||
OUString s1("123456789012345");
|
OUString s1("123456789012345");
|
||||||
b1 = s1;
|
b1 = s1;
|
||||||
CPPUNIT_ASSERT_EQUAL(s1, b1.toString());
|
CPPUNIT_ASSERT_EQUAL(s1, b1.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(16, b1.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), b1.getCapacity());
|
||||||
OUString s2("abc");
|
OUString s2("abc");
|
||||||
b1 = s2;
|
b1 = s2;
|
||||||
CPPUNIT_ASSERT_EQUAL(s2, b1.toString());
|
CPPUNIT_ASSERT_EQUAL(s2, b1.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(16, b1.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), b1.getCapacity());
|
||||||
OUString s3("1234567890123456");
|
OUString s3("1234567890123456");
|
||||||
b1 = s3;
|
b1 = s3;
|
||||||
CPPUNIT_ASSERT_EQUAL(s3, b1.toString());
|
CPPUNIT_ASSERT_EQUAL(s3, b1.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(32, b1.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(32), b1.getCapacity());
|
||||||
OUStringBuffer b2;
|
OUStringBuffer b2;
|
||||||
b2 = "123456789012345";
|
b2 = "123456789012345";
|
||||||
CPPUNIT_ASSERT_EQUAL(s1, b2.toString());
|
CPPUNIT_ASSERT_EQUAL(s1, b2.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(16, b2.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), b2.getCapacity());
|
||||||
b2 = "abc";
|
b2 = "abc";
|
||||||
CPPUNIT_ASSERT_EQUAL(s2, b2.toString());
|
CPPUNIT_ASSERT_EQUAL(s2, b2.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(16, b2.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), b2.getCapacity());
|
||||||
b2 = "1234567890123456";
|
b2 = "1234567890123456";
|
||||||
CPPUNIT_ASSERT_EQUAL(s3, b2.toString());
|
CPPUNIT_ASSERT_EQUAL(s3, b2.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(32, b2.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(32), b2.getCapacity());
|
||||||
#if HAVE_CXX11_UTF16_STRING_LITERAL \
|
#if HAVE_CXX11_UTF16_STRING_LITERAL \
|
||||||
&& (!defined SAL_W32 || defined __MINGW32__)
|
&& (!defined SAL_W32 || defined __MINGW32__)
|
||||||
// sal_Unicode is still wchar_t not char16_t even for MSVC 2015
|
// sal_Unicode is still wchar_t not char16_t even for MSVC 2015
|
||||||
OUStringBuffer b3;
|
OUStringBuffer b3;
|
||||||
b3 = u"123456789012345";
|
b3 = u"123456789012345";
|
||||||
CPPUNIT_ASSERT_EQUAL(s1, b3.toString());
|
CPPUNIT_ASSERT_EQUAL(s1, b3.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(16, b3.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), b3.getCapacity());
|
||||||
b3 = u"abc";
|
b3 = u"abc";
|
||||||
CPPUNIT_ASSERT_EQUAL(s2, b3.toString());
|
CPPUNIT_ASSERT_EQUAL(s2, b3.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(16, b3.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), b3.getCapacity());
|
||||||
b3 = u"1234567890123456";
|
b3 = u"1234567890123456";
|
||||||
CPPUNIT_ASSERT_EQUAL(s3, b3.toString());
|
CPPUNIT_ASSERT_EQUAL(s3, b3.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(32, b3.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(32), b3.getCapacity());
|
||||||
#endif
|
#endif
|
||||||
OUStringBuffer b4;
|
OUStringBuffer b4;
|
||||||
b4 = OUStringLiteral("1") + "23456789012345";
|
b4 = OUStringLiteral("1") + "23456789012345";
|
||||||
CPPUNIT_ASSERT_EQUAL(s1, b4.toString());
|
CPPUNIT_ASSERT_EQUAL(s1, b4.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(16, b4.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), b4.getCapacity());
|
||||||
b4 = OUStringLiteral("a") + "bc";
|
b4 = OUStringLiteral("a") + "bc";
|
||||||
CPPUNIT_ASSERT_EQUAL(s2, b4.toString());
|
CPPUNIT_ASSERT_EQUAL(s2, b4.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(16, b4.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(16), b4.getCapacity());
|
||||||
b4 = OUStringLiteral("1") + "234567890123456";
|
b4 = OUStringLiteral("1") + "234567890123456";
|
||||||
CPPUNIT_ASSERT_EQUAL(s3, b4.toString());
|
CPPUNIT_ASSERT_EQUAL(s3, b4.toString());
|
||||||
CPPUNIT_ASSERT_EQUAL(32, b4.getCapacity());
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(32), b4.getCapacity());
|
||||||
}
|
}
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE(Test);
|
CPPUNIT_TEST_SUITE(Test);
|
||||||
|
Reference in New Issue
Block a user