summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-28 14:22:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-28 14:22:53 +0200
commit29c09916760419ebfb87a954927bcd02b186a46b (patch)
tree6bfaa874a97abaa63bfade64352297e033adfb1c /vcl
parent36638dac7d9a9f14ebaedb6a76371beef9d14bde (diff)
loplugin:cppunitassertequals: vcl
Change-Id: I0b1b279b9bbb82b5e7aff0b0fb6a5be0ee0b3f62
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/errorhandler.cxx4
-rw-r--r--vcl/qa/cppunit/fontmetric.cxx24
2 files changed, 14 insertions, 14 deletions
diff --git a/vcl/qa/cppunit/errorhandler.cxx b/vcl/qa/cppunit/errorhandler.cxx
index e86cc793d2bd..defc218fac5f 100644
--- a/vcl/qa/cppunit/errorhandler.cxx
+++ b/vcl/qa/cppunit/errorhandler.cxx
@@ -51,12 +51,12 @@ void ErrorHandlerTest::testGetErrorString()
!ErrorHandler::GetErrorString(ERRCODE_ABORT, aErrStr));
// normally protected, but MockErrorHandler is a friend of this class
aErrHdlr.CreateString(ErrorInfo::GetErrorInfo(ERRCODE_ABORT), aErrStr);
- CPPUNIT_ASSERT_MESSAGE("error message should be non-dynamic", aErrStr == "Non-dynamic error");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("error message should be non-dynamic", OUString("Non-dynamic error"), aErrStr);
CPPUNIT_ASSERT_MESSAGE("GetErrorString(ERRCODE_NONE, aErrStr) should return false",
!ErrorHandler::GetErrorString(ERRCODE_NONE, aErrStr));
aErrHdlr.CreateString(ErrorInfo::GetErrorInfo(ERRCODE_NONE), aErrStr);
- CPPUNIT_ASSERT_MESSAGE("error message should be non-dynamic", aErrStr == "Non-dynamic error");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("error message should be non-dynamic", OUString("Non-dynamic error"), aErrStr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ErrorHandlerTest);
diff --git a/vcl/qa/cppunit/fontmetric.cxx b/vcl/qa/cppunit/fontmetric.cxx
index 7fdd531c52b3..93378c6e581c 100644
--- a/vcl/qa/cppunit/fontmetric.cxx
+++ b/vcl/qa/cppunit/fontmetric.cxx
@@ -107,33 +107,33 @@ void VclFontMetricTest::testEqualityOperator()
aLhs.SetFullstopCenteredFlag(true);
aRhs.SetFullstopCenteredFlag(true);
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Fullstop centered flag set same, aLhs == aRhs failed", aRhs, aLhs );
- CPPUNIT_ASSERT_MESSAGE( "Fullstop centered flag set same, aLhs != aRhs succeeded", !(aLhs != aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "Fullstop centered flag set same, aLhs == aRhs failed", aLhs.operator ==(aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "Fullstop centered flag set same, aLhs != aRhs succeeded", !aLhs.operator !=(aRhs) );
aLhs.SetExternalLeading(10);
aRhs.SetExternalLeading(10);
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "External leading set same, aLHS == aRhs failed", aRhs, aLhs );
- CPPUNIT_ASSERT_MESSAGE( "External leading set same, aLHS != aRhs succeeded", !(aLhs != aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "External leading set same, aLHS == aRhs failed", aLhs.operator ==(aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "External leading set same, aLHS != aRhs succeeded", !aLhs.operator !=(aRhs) );
aLhs.SetInternalLeading(10);
aRhs.SetInternalLeading(10);
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Internal leading set same, aLHS == aRhs failed", aRhs, aLhs );
- CPPUNIT_ASSERT_MESSAGE( "Internal leading set same, aLHS != aRhs succeeded", !(aLhs != aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "Internal leading set same, aLHS == aRhs failed", aLhs.operator ==(aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "Internal leading set same, aLHS != aRhs succeeded", !aLhs.operator !=(aRhs) );
aLhs.SetAscent( 100 );
aRhs.SetAscent( 100 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Ascent set same, aLHS == aRhs failed", aRhs, aLhs );
- CPPUNIT_ASSERT_MESSAGE( "Ascent set same, aLHS != aRhs succeeded", !(aLhs != aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "Ascent set same, aLHS == aRhs failed", aLhs.operator ==(aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "Ascent set same, aLHS != aRhs succeeded", !aLhs.operator !=(aRhs) );
aLhs.SetDescent( 100 );
aRhs.SetDescent( 100 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Descent set same, aLHS == aRhs failed", aRhs, aLhs);
- CPPUNIT_ASSERT_MESSAGE( "Descent set same, aLHS != aRhs succeeded", !(aLhs != aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "Descent set same, aLHS == aRhs failed", aLhs.operator ==(aRhs));
+ CPPUNIT_ASSERT_MESSAGE( "Descent set same, aLHS != aRhs succeeded", !aLhs.operator !=(aRhs) );
aLhs.SetSlant( 100 );
aRhs.SetSlant( 100 );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Slant set same, aLHS == aRhs failed", aRhs, aLhs);
- CPPUNIT_ASSERT_MESSAGE( "Slant set same, aLHS != aRhs succeeded", !(aLhs != aRhs) );
+ CPPUNIT_ASSERT_MESSAGE( "Slant set same, aLHS == aRhs failed", aLhs.operator ==(aRhs));
+ CPPUNIT_ASSERT_MESSAGE( "Slant set same, aLHS != aRhs succeeded", !aLhs.operator !=(aRhs) );
}