summaryrefslogtreecommitdiff
path: root/cppu/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-04-26 15:25:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-04-27 15:11:25 +0200
commit60728712f0f8bf72662da0b0e446ab416e9bf347 (patch)
treee950a7cb099f51bd048e7e2e2f65607282ff5052 /cppu/qa
parent87e0feafd3690a9b58890cc28f8ba0c521bfb557 (diff)
loplugin:ostr in cppu,cppuhelper
Change-Id: I15c00d7a87396d07be2d10a0311f308a93e8eec3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166751 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'cppu/qa')
-rw-r--r--cppu/qa/cppumaker/test_cppumaker.cxx7
-rw-r--r--cppu/qa/test_any.cxx84
-rw-r--r--cppu/qa/test_unotype.cxx58
-rw-r--r--cppu/qa/typelib.cxx17
4 files changed, 82 insertions, 84 deletions
diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx
index 22e0b81e19b6..7d611ab10a52 100644
--- a/cppu/qa/cppumaker/test_cppumaker.cxx
+++ b/cppu/qa/cppumaker/test_cppumaker.cxx
@@ -474,8 +474,7 @@ void Test::testBigStruct() {
void Test::testPolyStruct() {
CPPUNIT_ASSERT_EQUAL(
- OUString(
- "test.codemaker.cppumaker.Struct<char,short>"),
+ u"test.codemaker.cppumaker.Struct<char,short>"_ustr,
(css::uno::Any(
test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()).
getValueType().getTypeName()));
@@ -494,7 +493,7 @@ void Test::testExceptions() {
aEmptySequence;
test::codemaker::cppumaker::TestException1 e11(
- "abc", nullptr, 1,
+ u"abc"_ustr, nullptr, 1,
css::uno::Any(123.0),
test::codemaker::cppumaker::HelperEnum_ONE,
test::codemaker::cppumaker::Struct<sal_Int32, sal_Int32>(5, aEmptySequence), 2);
@@ -504,7 +503,7 @@ void Test::testExceptions() {
e13 = e11;
CPPUNIT_ASSERT_EQUAL(e11, e13);
test::codemaker::cppumaker::TestException2 e21(
- "abc", nullptr, 1,
+ u"abc"_ustr, nullptr, 1,
css::uno::Any(123.0),
test::codemaker::cppumaker::HelperEnum_ONE,
test::codemaker::cppumaker::Struct<sal_Int32, sal_Int32>(5, aEmptySequence), 2);
diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx
index 757040314844..9b54462a5fd2 100644
--- a/cppu/qa/test_any.cxx
+++ b/cppu/qa/test_any.cxx
@@ -284,9 +284,9 @@ void Test::testVoid() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -393,9 +393,9 @@ void Test::testBoolean() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -504,9 +504,9 @@ void Test::testByte() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -615,9 +615,9 @@ void Test::testShort() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -728,9 +728,9 @@ void Test::testUnsignedShort() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -839,9 +839,9 @@ void Test::testLong() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -950,9 +950,9 @@ void Test::testUnsignedLong() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1061,9 +1061,9 @@ void Test::testHyper() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1172,9 +1172,9 @@ void Test::testUnsignedHyper() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1283,9 +1283,9 @@ void Test::testFloat() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1394,9 +1394,9 @@ void Test::testDouble() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1506,9 +1506,9 @@ void Test::testChar() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'1', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1553,7 +1553,7 @@ void Test::testChar() {
}
void Test::testString() {
- css::uno::Any a(OUString("1"));
+ css::uno::Any a(u"1"_ustr);
CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<OUString>::get()));
{
bool b = true;
@@ -1617,9 +1617,9 @@ void Test::testString() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", (a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("1"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"1"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1728,9 +1728,9 @@ void Test::testType() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1840,9 +1840,9 @@ void Test::testSequence() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -1970,9 +1970,9 @@ void Test::testEnum() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -2086,9 +2086,9 @@ void Test::testStruct() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -2154,7 +2154,7 @@ void Test::testStruct() {
void Test::testPoly() {
css::uno::Any a;
a <<= Poly< css::uno::Sequence< ::sal_Unicode > >();
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "type name", OUString("Poly<[]char>"), a.getValueType().getTypeName() );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "type name", u"Poly<[]char>"_ustr, a.getValueType().getTypeName() );
CPPUNIT_ASSERT_EQUAL_MESSAGE(
"constructor",
css::uno::Any(Poly< css::uno::Sequence< ::sal_Unicode > >()), a);
@@ -2228,9 +2228,9 @@ void Test::testException() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -2364,9 +2364,9 @@ void Test::testInterface() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
@@ -2496,9 +2496,9 @@ void Test::testNull() {
CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b);
}
{
- OUString b("2");
+ OUString b(u"2"_ustr);
CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", u"2"_ustr, b );
}
{
css::uno::Type b(cppu::UnoType<OUString>::get());
diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index 829676a14d74..56a5937729d1 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -101,67 +101,67 @@ void Test::testUnoType() {
css::uno::Type t;
t = cppu::UnoType<cppu::UnoVoidType>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_VOID, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("void"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"void"_ustr, t.getTypeName());
CPPUNIT_ASSERT(bool(cppu::UnoType<void>::get() == t));
t = cppu::UnoType<bool>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_BOOLEAN, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("boolean"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"boolean"_ustr, t.getTypeName());
CPPUNIT_ASSERT(bool(cppu::UnoType<sal_Bool>::get() == t));
t = cppu::UnoType<sal_Int8>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_BYTE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("byte"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"byte"_ustr, t.getTypeName());
t = cppu::UnoType<sal_Int16>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SHORT, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("short"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"short"_ustr, t.getTypeName());
t = cppu::UnoType<cppu::UnoUnsignedShortType>::get();
CPPUNIT_ASSERT_EQUAL(
css::uno::TypeClass_UNSIGNED_SHORT, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("unsigned short"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"unsigned short"_ustr, t.getTypeName());
t = cppu::UnoType<sal_Int32>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_LONG, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("long"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"long"_ustr, t.getTypeName());
t = cppu::UnoType<sal_uInt32>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_UNSIGNED_LONG, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("unsigned long"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"unsigned long"_ustr, t.getTypeName());
t = cppu::UnoType<sal_Int64>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_HYPER, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("hyper"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"hyper"_ustr, t.getTypeName());
t = cppu::UnoType<sal_uInt64>::get();
CPPUNIT_ASSERT_EQUAL(
css::uno::TypeClass_UNSIGNED_HYPER, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("unsigned hyper"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"unsigned hyper"_ustr, t.getTypeName());
t = cppu::UnoType<float>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_FLOAT, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("float"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"float"_ustr, t.getTypeName());
t = cppu::UnoType<double>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_DOUBLE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("double"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"double"_ustr, t.getTypeName());
t = cppu::UnoType<cppu::UnoCharType>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_CHAR, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("char"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"char"_ustr, t.getTypeName());
t = cppu::UnoType<OUString>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_STRING, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("string"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"string"_ustr, t.getTypeName());
t = cppu::UnoType<css::uno::Type>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_TYPE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("type"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"type"_ustr, t.getTypeName());
t = cppu::UnoType<css::uno::Any>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_ANY, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("any"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"any"_ustr, t.getTypeName());
t = cppu::UnoType<cppu::UnoSequenceType<sal_Int8>>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("[]byte"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"[]byte"_ustr, t.getTypeName());
CPPUNIT_ASSERT(bool(cppu::UnoType<css::uno::Sequence<sal_Int8>>::get() == t));
t = cppu::UnoType<cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("[]unsigned short"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"[]unsigned short"_ustr, t.getTypeName());
t = cppu::UnoType<cppu::UnoSequenceType<cppu::UnoCharType>>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("[]char"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"[]char"_ustr, t.getTypeName());
t = cppu::UnoType<
cppu::UnoSequenceType<cppu::UnoSequenceType<sal_Int8>>>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("[][]byte"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"[][]byte"_ustr, t.getTypeName());
CPPUNIT_ASSERT_EQUAL(
cppu::UnoType<css::uno::Sequence<css::uno::Sequence<sal_Int8>>>::get(),
t);
@@ -169,43 +169,43 @@ void Test::testUnoType() {
cppu::UnoSequenceType<
cppu::UnoSequenceType<cppu::UnoUnsignedShortType>>>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("[][]unsigned short"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"[][]unsigned short"_ustr, t.getTypeName());
t = cppu::UnoType<
cppu::UnoSequenceType<cppu::UnoSequenceType<cppu::UnoCharType>>>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
- CPPUNIT_ASSERT_EQUAL(OUString("[][]char"), t.getTypeName());
+ CPPUNIT_ASSERT_EQUAL(u"[][]char"_ustr, t.getTypeName());
t = cppu::UnoType<css::uno::TypeClass>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_ENUM, t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
- OUString("com.sun.star.uno.TypeClass"), t.getTypeName());
+ u"com.sun.star.uno.TypeClass"_ustr, t.getTypeName());
t = cppu::UnoType<css::lang::EventObject>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_STRUCT, t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
- OUString("com.sun.star.lang.EventObject"), t.getTypeName());
+ u"com.sun.star.lang.EventObject"_ustr, t.getTypeName());
CPPUNIT_ASSERT_EQUAL(cppu::UnoType<DerivedStruct1>::get(), t);
t = cppu::UnoType<css::beans::PropertyChangeEvent>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_STRUCT, t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
- OUString("com.sun.star.beans.PropertyChangeEvent"), t.getTypeName());
+ u"com.sun.star.beans.PropertyChangeEvent"_ustr, t.getTypeName());
CPPUNIT_ASSERT_EQUAL(cppu::UnoType<DerivedStruct2>::get(), t);
t = cppu::UnoType<css::beans::Optional<sal_Int8>>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_STRUCT, t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
- OUString("com.sun.star.beans.Optional<byte>"), t.getTypeName());
+ u"com.sun.star.beans.Optional<byte>"_ustr, t.getTypeName());
t = cppu::UnoType<css::uno::Exception>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_EXCEPTION, t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
- OUString("com.sun.star.uno.Exception"), t.getTypeName());
+ u"com.sun.star.uno.Exception"_ustr, t.getTypeName());
CPPUNIT_ASSERT_EQUAL(cppu::UnoType<DerivedException1>::get(), t);
t = cppu::UnoType<css::uno::RuntimeException>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_EXCEPTION, t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
- OUString("com.sun.star.uno.RuntimeException"), t.getTypeName());
+ u"com.sun.star.uno.RuntimeException"_ustr, t.getTypeName());
CPPUNIT_ASSERT_EQUAL(cppu::UnoType<DerivedException2>::get(), t);
t = cppu::UnoType<css::uno::XInterface>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_INTERFACE, t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
- OUString("com.sun.star.uno.XInterface"), t.getTypeName());
+ u"com.sun.star.uno.XInterface"_ustr, t.getTypeName());
CPPUNIT_ASSERT_EQUAL(
cppu::UnoType<css::uno::Reference<css::uno::XInterface>>::get(), t);
CPPUNIT_ASSERT_EQUAL(cppu::UnoType<DerivedInterface1>::get(), t);
@@ -214,7 +214,7 @@ void Test::testUnoType() {
t = cppu::UnoType<css::uno::XComponentContext>::get();
CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_INTERFACE, t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
- OUString("com.sun.star.uno.XComponentContext"), t.getTypeName());
+ u"com.sun.star.uno.XComponentContext"_ustr, t.getTypeName());
CPPUNIT_ASSERT_EQUAL(
cppu::UnoType<css::uno::Reference<css::uno::XComponentContext>>::get(),
t);
diff --git a/cppu/qa/typelib.cxx b/cppu/qa/typelib.cxx
index 227e5731cc4f..a5d59812f04d 100644
--- a/cppu/qa/typelib.cxx
+++ b/cppu/qa/typelib.cxx
@@ -59,9 +59,9 @@ public:
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), t->nDefaultEnumValue);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), t->nEnumValues);
CPPUNIT_ASSERT(t->ppEnumNames != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString("METHOD"), OUString::unacquired(&t->ppEnumNames[0]));
- CPPUNIT_ASSERT_EQUAL(OUString("PROPERTY"), OUString::unacquired(&t->ppEnumNames[1]));
- CPPUNIT_ASSERT_EQUAL(OUString("UNKNOWN"), OUString::unacquired(&t->ppEnumNames[2]));
+ CPPUNIT_ASSERT_EQUAL(u"METHOD"_ustr, OUString::unacquired(&t->ppEnumNames[0]));
+ CPPUNIT_ASSERT_EQUAL(u"PROPERTY"_ustr, OUString::unacquired(&t->ppEnumNames[1]));
+ CPPUNIT_ASSERT_EQUAL(u"UNKNOWN"_ustr, OUString::unacquired(&t->ppEnumNames[2]));
CPPUNIT_ASSERT(t->pEnumValues != nullptr);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), t->pEnumValues[0]);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), t->pEnumValues[1]);
@@ -110,10 +110,10 @@ public:
CPPUNIT_ASSERT_EQUAL(t2, css::uno::Type(t->aBase.ppTypeRefs[1]));
CPPUNIT_ASSERT_EQUAL(t3, css::uno::Type(t->aBase.ppTypeRefs[2]));
CPPUNIT_ASSERT(t->aBase.ppMemberNames != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString("Finish"), OUString::unacquired(&t->aBase.ppMemberNames[0]));
- CPPUNIT_ASSERT_EQUAL(OUString("ErrorMessage"),
+ CPPUNIT_ASSERT_EQUAL(u"Finish"_ustr, OUString::unacquired(&t->aBase.ppMemberNames[0]));
+ CPPUNIT_ASSERT_EQUAL(u"ErrorMessage"_ustr,
OUString::unacquired(&t->aBase.ppMemberNames[1]));
- CPPUNIT_ASSERT_EQUAL(OUString("Return"), OUString::unacquired(&t->aBase.ppMemberNames[2]));
+ CPPUNIT_ASSERT_EQUAL(u"Return"_ustr, OUString::unacquired(&t->aBase.ppMemberNames[2]));
CPPUNIT_ASSERT(t->pParameterizedTypes == nullptr);
// `offsets` and `typerefs` must still be valid:
CPPUNIT_ASSERT_EQUAL(t->aBase.pMemberOffsets[0], offsets[0]);
@@ -164,9 +164,8 @@ public:
CPPUNIT_ASSERT_EQUAL(t1, css::uno::Type(t->aBase.ppTypeRefs[0]));
CPPUNIT_ASSERT_EQUAL(t2, css::uno::Type(t->aBase.ppTypeRefs[1]));
CPPUNIT_ASSERT(t->aBase.ppMemberNames != nullptr);
- CPPUNIT_ASSERT_EQUAL(OUString("IsPresent"),
- OUString::unacquired(&t->aBase.ppMemberNames[0]));
- CPPUNIT_ASSERT_EQUAL(OUString("Value"), OUString::unacquired(&t->aBase.ppMemberNames[1]));
+ CPPUNIT_ASSERT_EQUAL(u"IsPresent"_ustr, OUString::unacquired(&t->aBase.ppMemberNames[0]));
+ CPPUNIT_ASSERT_EQUAL(u"Value"_ustr, OUString::unacquired(&t->aBase.ppMemberNames[1]));
CPPUNIT_ASSERT(t->pParameterizedTypes != nullptr);
CPPUNIT_ASSERT_EQUAL(param[0], t->pParameterizedTypes[0]);
CPPUNIT_ASSERT_EQUAL(param[1], t->pParameterizedTypes[1]);