diff options
Diffstat (limited to 'filter/qa/cppunit/priority-test.cxx')
-rw-r--r-- | filter/qa/cppunit/priority-test.cxx | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/filter/qa/cppunit/priority-test.cxx b/filter/qa/cppunit/priority-test.cxx index 88b232684ecf..223d0c58c937 100644 --- a/filter/qa/cppunit/priority-test.cxx +++ b/filter/qa/cppunit/priority-test.cxx @@ -63,24 +63,20 @@ void PriorityFilterTest::testPriority() OUString aTypeName = xDetection->queryTypeByURL(aURL); OUString aFormatCorrect = OUString::createFromAscii(aToCheck[i].pFormat); - OUStringBuffer aMsg("Mis-matching formats "); - aMsg.append("'"); - aMsg.append(aTypeName); - aMsg.append("' should be '"); - aMsg.append(aFormatCorrect); - aMsg.append("'"); - CPPUNIT_ASSERT_EQUAL_MESSAGE(OUStringToOString(aMsg.makeStringAndClear(), + OUString aMsg = "Mis-matching formats " + "'" + + aTypeName + + "' should be '" + + aFormatCorrect + + "'"; + CPPUNIT_ASSERT_EQUAL_MESSAGE(OUStringToOString(aMsg, RTL_TEXTENCODING_UTF8).getStr(), aFormatCorrect, aTypeName); } catch (const uno::Exception &e) { - OUStringBuffer aMsg("Exception querying for type: "); - aMsg.append("'"); - aMsg.append(e.Message); - aMsg.append("'"); - CPPUNIT_FAIL(OUStringToOString(aMsg.makeStringAndClear(), - RTL_TEXTENCODING_UTF8).getStr()); + OUString aMsg = "Exception querying for type: '" + e.Message + "'"; + CPPUNIT_FAIL(OUStringToOString(aMsg, RTL_TEXTENCODING_UTF8).getStr()); } } } |