basegfx/test/B2DHomMatrixTest.cxx | 4 chart2/qa/extras/chart2export.cxx | 33 chart2/qa/extras/chart2import.cxx | 24 compilerplugins/clang/cppunitassertequals.cxx | 2 compilerplugins/clang/test/cppunitassertequals.cxx | 2 cppu/qa/test_any.cxx | 1163 ++- desktop/qa/desktop_lib/test_desktop_lib.cxx | 17 editeng/qa/unit/core-test.cxx | 30 i18nlangtag/qa/cppunit/test_languagetag.cxx | 21 i18npool/qa/cppunit/test_breakiterator.cxx | 93 i18npool/qa/cppunit/test_characterclassification.cxx | 10 i18npool/qa/cppunit/test_textsearch.cxx | 69 sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 6742 +++++++++++++------ sal/qa/osl/process/osl_Thread.cxx | 28 sal/qa/rtl/digest/rtl_digest.cxx | 10 sal/qa/rtl/random/rtl_random.cxx | 10 sal/qa/rtl/textenc/rtl_tencinfo.cxx | 17 sal/qa/rtl/uuid/rtl_Uuid.cxx | 6 sal/qa/sal/test_types.cxx | 3 sc/qa/unit/copy_paste_test.cxx | 6 sc/qa/unit/filters-test.cxx | 9 sc/qa/unit/mark_test.cxx | 9 sc/qa/unit/pivottable_filters_test.cxx | 241 sc/qa/unit/scshapetest.cxx | 6 sc/qa/unit/subsequent_export-test.cxx | 6 sc/qa/unit/subsequent_filters-test.cxx | 26 sc/qa/unit/ucalc.cxx | 206 sc/qa/unit/ucalc_formula.cxx | 45 sc/qa/unit/ucalc_pivottable.cxx | 160 sc/qa/unit/ucalc_sharedformula.cxx | 120 sd/qa/unit/import-tests-smartart.cxx | 16 sd/qa/unit/misc-tests.cxx | 6 sdext/source/pdfimport/test/tests.cxx | 9 sfx2/qa/cppunit/test_metadatable.cxx | 4 sot/qa/cppunit/test_sot.cxx | 8 starmath/qa/cppunit/test_starmath.cxx | 16 svl/qa/unit/svl.cxx | 3 sw/qa/core/Test-BigPtrArray.cxx | 18 sw/qa/core/uwriter.cxx | 74 sw/qa/extras/layout/layout2.cxx | 9 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 6 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 21 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 3 sw/qa/extras/rtfexport/rtfexport3.cxx | 6 sw/qa/extras/tiledrendering/tiledrendering.cxx | 9 sw/qa/extras/uiwriter/uiwriter2.cxx | 9 sw/qa/extras/ww8export/ww8export.cxx | 17 sw/qa/uitest/writer_tests7/tdf139301.py | 5 test/source/sheet/xdocumentauditing.cxx | 4 test/source/table/xcell.cxx | 4 test/source/table/xcellcursor.cxx | 8 toolkit/qa/cppunit/UnitConversion.cxx | 6 tools/qa/cppunit/test_fract.cxx | 49 tools/qa/cppunit/test_stream.cxx | 12 unoxml/qa/unit/domtest.cxx | 8 vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx | 7 vcl/qa/cppunit/canvasbitmaptest.cxx | 22 vcl/qa/cppunit/lifecycle.cxx | 5 vcl/qa/cppunit/timer.cxx | 3 59 files changed, 6648 insertions(+), 2837 deletions(-)
New commits: commit 6b00d0576a310796590631d14c54d7d5ea6814ac Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Feb 8 07:48:59 2021 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Feb 8 09:15:01 2021 +0100 Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b) ...by re-enabling the code temporarily #if'ed-out in a528392e71bc70136021be4e3d83732fccbb885e "Fixed/improved loplugin:cppunitassertequals" (and which then triggers lots of other lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings). For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it was more straightforward to rewrite them with an explicit call to operator == (which silences loplugin:cppunitassertequal) than to adapt them to CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types. In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been implemented trivially for now, but might want to combine that with the DEBUG_PIVOT_TABLE-only ScDPItemData::Dump. Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110546 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/basegfx/test/B2DHomMatrixTest.cxx b/basegfx/test/B2DHomMatrixTest.cxx index e5b923e6dd82..04201ca19c0c 100644 --- a/basegfx/test/B2DHomMatrixTest.cxx +++ b/basegfx/test/B2DHomMatrixTest.cxx @@ -440,8 +440,8 @@ public: 1E-12); CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("decompose: error test J1", 3938.0, aDScale.getY(), 1E-12); - CPPUNIT_ASSERT_MESSAGE("decompose: error test J1", - aDTrans.getX() == 10482 && aDTrans.getY() == 4921); + CPPUNIT_ASSERT_EQUAL_MESSAGE("decompose: error test J1", 10482.0, aDTrans.getX()); + CPPUNIT_ASSERT_EQUAL_MESSAGE("decompose: error test J1", 4921.0, aDTrans.getY()); CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("decompose: error test J1", F_PI, fDRot, 1E-12); } diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index c8b4c03755e7..309381d80224 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -1817,11 +1817,13 @@ void Chart2ExportTest::testTitleManualLayoutXLSX() OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:x", "val"); double nX = aXVal.toDouble(); - CPPUNIT_ASSERT(nX > 0 && nX < 1); + CPPUNIT_ASSERT(nX > 0); + CPPUNIT_ASSERT(nX < 1); OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:y", "val"); double nY = aYVal.toDouble(); - CPPUNIT_ASSERT(nY > 0 && nY < 1); + CPPUNIT_ASSERT(nY > 0); + CPPUNIT_ASSERT(nY < 1); CPPUNIT_ASSERT(nX != nY); assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:tx/c:rich/a:bodyPr", "rot", "1200000"); @@ -1839,20 +1841,24 @@ void Chart2ExportTest::testPlotAreaManualLayoutXLSX() OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:x", "val"); double nX = aXVal.toDouble(); - CPPUNIT_ASSERT(nX > 0 && nX < 1); + CPPUNIT_ASSERT(nX > 0); + CPPUNIT_ASSERT(nX < 1); OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:y", "val"); double nY = aYVal.toDouble(); - CPPUNIT_ASSERT(nY > 0 && nY < 1); + CPPUNIT_ASSERT(nY > 0); + CPPUNIT_ASSERT(nY < 1); CPPUNIT_ASSERT(nX != nY); OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:w", "val"); double nW = aWVal.toDouble(); - CPPUNIT_ASSERT(nW > 0 && nW < 1); + CPPUNIT_ASSERT(nW > 0); + CPPUNIT_ASSERT(nW < 1); OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:h", "val"); double nH = aHVal.toDouble(); - CPPUNIT_ASSERT(nH > 0 && nH < 1); + CPPUNIT_ASSERT(nH > 0); + CPPUNIT_ASSERT(nH < 1); CPPUNIT_ASSERT(nH != nW); } @@ -1868,20 +1874,24 @@ void Chart2ExportTest::testLegendManualLayoutXLSX() OUString aXVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:x", "val"); double nX = aXVal.toDouble(); - CPPUNIT_ASSERT(nX > 0 && nX < 1); + CPPUNIT_ASSERT(nX > 0); + CPPUNIT_ASSERT(nX < 1); OUString aYVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:y", "val"); double nY = aYVal.toDouble(); - CPPUNIT_ASSERT(nY > 0 && nY < 1); + CPPUNIT_ASSERT(nY > 0); + CPPUNIT_ASSERT(nY < 1); CPPUNIT_ASSERT(nX != nY); OUString aWVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:w", "val"); double nW = aWVal.toDouble(); - CPPUNIT_ASSERT(nW > 0 && nW < 1); + CPPUNIT_ASSERT(nW > 0); + CPPUNIT_ASSERT(nW < 1); OUString aHVal = getXPath(pXmlDoc, "/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:h", "val"); double nH = aHVal.toDouble(); - CPPUNIT_ASSERT(nH > 0 && nH < 1); + CPPUNIT_ASSERT(nH > 0); + CPPUNIT_ASSERT(nH < 1); CPPUNIT_ASSERT(nH != nW); // Make sure that default text font size is preserved after export @@ -2946,7 +2956,8 @@ void Chart2ExportTest::testTdf134255() CPPUNIT_ASSERT(xDataSeries.is()); Reference< beans::XPropertySet > xPropSet(xDataSeries, UNO_QUERY_THROW); bool bWrap = false; - CPPUNIT_ASSERT((xPropSet->getPropertyValue("TextWordWrap") >>= bWrap) && bWrap); + CPPUNIT_ASSERT((xPropSet->getPropertyValue("TextWordWrap") >>= bWrap)); + CPPUNIT_ASSERT(bWrap); // export test xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML Text"); diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 57c7227b49c1..4b425a386b70 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -707,7 +707,8 @@ void Chart2ImportTest::testPPTXPercentageNumberFormats() Reference<beans::XPropertySet> xPS(xYAxis, uno::UNO_QUERY_THROW); bool bLinkNumberFormatToSource = true; bool bSuccess = xPS->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; - CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", bSuccess && !bLinkNumberFormatToSource); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", bSuccess); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to false.", !bLinkNumberFormatToSource); // FIXME: This should be in fact "0.00%". // see TODO in oox/source/drawingml/chart/modelbase.cxx @@ -1049,19 +1050,22 @@ void Chart2ImportTest::testTdf124817() xDataSeries = getDataSeriesFromDoc(xChartDoc, 0); CPPUNIT_ASSERT(xDataSeries.is()); uno::Reference<beans::XPropertySet> xPropSet_0(xDataSeries, uno::UNO_QUERY_THROW); - CPPUNIT_ASSERT((xPropSet_0->getPropertyValue("Symbol") >>= aSymblProp) && (aSymblProp.Style == chart2::SymbolStyle_NONE)); + CPPUNIT_ASSERT((xPropSet_0->getPropertyValue("Symbol") >>= aSymblProp)); + CPPUNIT_ASSERT_EQUAL(chart2::SymbolStyle_NONE, aSymblProp.Style); // Check the symbol of data series 2 (marker style square) xDataSeries = getDataSeriesFromDoc(xChartDoc, 1); CPPUNIT_ASSERT(xDataSeries.is()); uno::Reference<beans::XPropertySet> xPropSet_1(xDataSeries, uno::UNO_QUERY_THROW); - CPPUNIT_ASSERT((xPropSet_1->getPropertyValue("Symbol") >>= aSymblProp) && (aSymblProp.FillColor == static_cast<sal_Int32>(0xED7D31))); + CPPUNIT_ASSERT((xPropSet_1->getPropertyValue("Symbol") >>= aSymblProp)); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xED7D31), aSymblProp.FillColor); // Check the symbol of data series 3 (marker style diagonal cross) xDataSeries = getDataSeriesFromDoc(xChartDoc, 2); CPPUNIT_ASSERT(xDataSeries.is()); uno::Reference<beans::XPropertySet> xPropSet_2(xDataSeries, uno::UNO_QUERY_THROW); - CPPUNIT_ASSERT((xPropSet_2->getPropertyValue("Symbol") >>= aSymblProp) && (aSymblProp.BorderColor == static_cast<sal_Int32>(0xFF0000))); + CPPUNIT_ASSERT((xPropSet_2->getPropertyValue("Symbol") >>= aSymblProp)); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xFF0000), aSymblProp.BorderColor); } void Chart2ImportTest::testTdf126033() @@ -1284,7 +1288,8 @@ void Chart2ImportTest::testNumberFormatsXLSX() bool bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; CPPUNIT_ASSERT_EQUAL(false, bSuccess); bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; - CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bLinkNumberFormatToSource); xPropertySet.set(xDataSeries->getDataPointByIndex(1), uno::UNO_SET_THROW); xPropertySet->getPropertyValue("Label") >>= aLabel; @@ -1295,7 +1300,8 @@ void Chart2ImportTest::testNumberFormatsXLSX() bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; CPPUNIT_ASSERT_EQUAL(false, bSuccess); bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; - CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bLinkNumberFormatToSource); xPropertySet.set(xDataSeries->getDataPointByIndex(2), uno::UNO_SET_THROW); xPropertySet->getPropertyValue("Label") >>= aLabel; @@ -1306,7 +1312,8 @@ void Chart2ImportTest::testNumberFormatsXLSX() bSuccess = xPropertySet->getPropertyValue("PercentageNumberFormat") >>= nNumberFormat; CPPUNIT_ASSERT_EQUAL(false, bSuccess); bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; - CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bLinkNumberFormatToSource); } void Chart2ImportTest::testNumberFormatsDOCX() @@ -1371,7 +1378,8 @@ void Chart2ImportTest::testPercentageNumberFormatsDOCX() CPPUNIT_ASSERT_EQUAL(sal_False, aLabel.ShowNumber); CPPUNIT_ASSERT_EQUAL(sal_True, aLabel.ShowNumberInPercent); bool bSuccess = xPropertySet->getPropertyValue(CHART_UNONAME_LINK_TO_SRC_NUMFMT) >>= bLinkNumberFormatToSource; - CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess && bLinkNumberFormatToSource); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bSuccess); + CPPUNIT_ASSERT_MESSAGE("\"LinkNumberFormatToSource\" should be set to true.", bLinkNumberFormatToSource); } void Chart2ImportTest::testAutoTitleDelDefaultValue2007XLSX() diff --git a/compilerplugins/clang/cppunitassertequals.cxx b/compilerplugins/clang/cppunitassertequals.cxx index 4f5e364540c8..56f13b822163 100644 --- a/compilerplugins/clang/cppunitassertequals.cxx +++ b/compilerplugins/clang/cppunitassertequals.cxx @@ -191,7 +191,6 @@ void CppunitAssertEquals::checkExpr( reportEquals(range, name, op == BO_NE, e->getLHS(), e->getRHS()); return; } -#if 0 // TODO: enable later if ((!negated && op == BO_LAnd) || (negated && op == BO_LOr)) { report( DiagnosticsEngine::Warning, @@ -199,7 +198,6 @@ void CppunitAssertEquals::checkExpr( << name << range; return; } -#endif return; } if (auto const e = dyn_cast<CXXOperatorCallExpr>(expr)) { diff --git a/compilerplugins/clang/test/cppunitassertequals.cxx b/compilerplugins/clang/test/cppunitassertequals.cxx index 0eb1b4e3cfd9..9fe35cfc6919 100644 --- a/compilerplugins/clang/test/cppunitassertequals.cxx +++ b/compilerplugins/clang/test/cppunitassertequals.cxx @@ -23,14 +23,12 @@ void test( bool b1, bool b2, OUString const & s1, OUString const & s2, T t, void * p, std::nullptr_t n) { CppUnit::Asserter::failIf(b1,""); -#if 0 // TODO: enable later CPPUNIT_ASSERT(b1 && b2); // expected-error {{rather split into two CPPUNIT_ASSERT [loplugin:cppunitassertequals]}} CPPUNIT_ASSERT((b1 && b2)); // expected-error {{rather split into two CPPUNIT_ASSERT [loplugin:cppunitassertequals]}} CPPUNIT_ASSERT(!(b1 || b2)); // expected-error {{rather split into two CPPUNIT_ASSERT [loplugin:cppunitassertequals]}} CPPUNIT_ASSERT(!(b1 && b2)); CPPUNIT_ASSERT(!!(b1 && b2)); // expected-error {{rather split into two CPPUNIT_ASSERT [loplugin:cppunitassertequals]}} CPPUNIT_ASSERT_MESSAGE("", b1 && b2); // expected-error {{rather split into two CPPUNIT_ASSERT_MESSAGE [loplugin:cppunitassertequals]}} -#endif CPPUNIT_ASSERT(b1 == b2); // expected-error {{rather call CPPUNIT_ASSERT_EQUAL when comparing 'bool' and 'bool' (or rewrite as an explicit operator == call when the operator itself is the topic) [loplugin:cppunitassertequals]}} CPPUNIT_ASSERT(b1 != b2); CPPUNIT_ASSERT((b1 == b2)); // expected-error {{rather call CPPUNIT_ASSERT_EQUAL when comparing 'bool' and 'bool' (or rewrite as an explicit operator == call when the operator itself is the topic) [loplugin:cppunitassertequals]}} diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx index 7dfed7a714de..06fa51168b64 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -458,77 +458,98 @@ void Test::testByte() { } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(1), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(1), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(1), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(1), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(1), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(1), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("float", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(1), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("double", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 1.0, b); } { sal_Unicode b = '2'; if (std::is_same< sal_Unicode, sal_uInt16 >::value) { - CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("@sal_Unicode", u'\u0001', b); } else { - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -537,89 +558,113 @@ void Test::testShort() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<sal_Int16>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(1), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(1), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(1), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(1), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(1), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(1), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("float", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(1), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("double", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 1.0, b); } { sal_Unicode b = '2'; if (std::is_same< sal_Unicode, sal_uInt16 >::value) { - CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("@sal_Unicode", u'\u0001', b); } else { - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -630,89 +675,113 @@ void Test::testUnsignedShort() { bool(a.getValueType() == cppu::UnoType<cppu::UnoUnsignedShortType>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(1), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(1), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(1), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(1), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(1), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(1), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("float", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(1), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("double", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 1.0, b); } { sal_Unicode b = '2'; if (std::is_same< sal_Unicode, sal_uInt16 >::value) { - CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("@sal_Unicode", u'\u0001', b); } else { - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -721,85 +790,108 @@ void Test::testLong() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<sal_Int32>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(1), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(1), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(1), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(1), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("double", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 1.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -808,85 +900,108 @@ void Test::testUnsignedLong() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<sal_uInt32>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(1), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(1), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(1), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(1), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("double", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 1.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -895,85 +1010,108 @@ void Test::testHyper() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<sal_Int64>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(1), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(1), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -982,85 +1120,108 @@ void Test::testUnsignedHyper() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<sal_uInt64>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(1), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(1), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1069,85 +1230,108 @@ void Test::testFloat() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<float>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("float", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(1), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("double", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 1.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1156,85 +1340,108 @@ void Test::testDouble() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<double>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", (a >>= b) && b == 1); + CPPUNIT_ASSERT_MESSAGE("double", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 1.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1244,89 +1451,113 @@ void Test::testChar() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<cppu::UnoCharType>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; if (std::is_same< sal_Unicode, sal_uInt16 >::value) { - CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("@sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("@sal_Unicode", u'2', b); } else { - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", (a >>= b) && b == '1'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'1', b); } } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1335,85 +1566,108 @@ void Test::testString() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<OUString>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", (a >>= b) && b == "1" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", (a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("1"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1422,84 +1676,106 @@ void Test::testType() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<css::uno::Type>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( - "css::uno::Type", (a >>= b) && b == cppu::UnoType<sal_Int32>::get()); + "css::uno::Type", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", cppu::UnoType<sal_Int32>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1511,91 +1787,120 @@ void Test::testSequence() { == cppu::UnoType<css::uno::Sequence<sal_Int32>>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { css::uno::Sequence< sal_Int32 > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<sal_Int32>", - (a >>= b) && b.getLength() == 1 && b[0] == 1); + (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<sal_Int32>", + sal_Int32(1), b.getLength()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<sal_Int32>", + sal_Int32(1), b[0]); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1604,89 +1909,113 @@ void Test::testEnum() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<Enum2>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Enum2 b = Enum2_M2; - CPPUNIT_ASSERT_MESSAGE("Enum2", (a >>= b) && b == Enum2_M1); + CPPUNIT_ASSERT_MESSAGE("Enum2", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum2", Enum2_M1, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1695,98 +2024,127 @@ void Test::testStruct() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<Struct2a>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Struct2 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct2", (a >>= b) && b.member == 1); + CPPUNIT_ASSERT_MESSAGE("Struct2", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct2", sal_Int32(1), b.member); } { Struct2a b(2, 2); CPPUNIT_ASSERT_MESSAGE( - "Struct2a", (a >>= b) && b.member == 1 && b.member2 == 3); + "Struct2a", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "Struct2a", sal_Int32(1), b.member); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "Struct2a", sal_Int32(3), b.member2); } { Struct2b b(2, 2, 2); - CPPUNIT_ASSERT_MESSAGE("Struct2b", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct2b", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct2b", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1807,103 +2165,132 @@ void Test::testException() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<Exception2a>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception1", sal_Int32(2), b.member); } { Exception2 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception2", (a >>= b) && b.member == 1); + CPPUNIT_ASSERT_MESSAGE("Exception2", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception2", sal_Int32(1), b.member); } { Exception2a b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2, 2); CPPUNIT_ASSERT_MESSAGE( - "Exception2a", (a >>= b) && b.member == 1 && b.member2 == 3); + "Exception2a", (a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "Exception2a", sal_Int32(1), b.member); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "Exception2a", sal_Int32(3), b.member2); } { Exception2b b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2, 2); - CPPUNIT_ASSERT_MESSAGE("Exception2b", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception2b", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Exception2b", sal_Int32(2), b.member); } { css::uno::Reference< Interface1 > i(new Impl1); css::uno::Reference< Interface1 > b(i); - CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b) && b == i); + CPPUNIT_ASSERT_MESSAGE("Interface1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Interface1", i, b); } } @@ -1913,102 +2300,129 @@ void Test::testInterface() { CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<Interface2a>::get())); { bool b = true; - CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("bool", b); } { sal_Bool b = true; - CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b) && b); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", !(a >>= b)); + CPPUNIT_ASSERT_MESSAGE("sal_Bool", b); } { sal_Int8 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int8", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8", sal_Int8(2), b); } { sal_Int16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16", sal_Int16(2), b); } { sal_uInt16 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt16", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16", sal_uInt16(2), b); } { sal_Int32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int32", sal_Int32(2), b); } { sal_uInt32 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt32", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt32", sal_uInt32(2), b); } { sal_Int64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_Int64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int64", sal_Int64(2), b); } { sal_uInt64 b = 2; - CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("sal_uInt64", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt64", sal_uInt64(2), b); } { float b = 2; - CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("float", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("float", float(2), b); } { double b = 2; - CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b) && b == 2); + CPPUNIT_ASSERT_MESSAGE("double", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("double", 2.0, b); } { sal_Unicode b = '2'; - CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b) && b == '2'); + CPPUNIT_ASSERT_MESSAGE("sal_Unicode", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Unicode", u'2', b); } { OUString b("2"); - CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) && b == "2" ); + CPPUNIT_ASSERT_MESSAGE( "OUString", !(a >>= b) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "OUString", OUString("2"), b ); } { css::uno::Type b(cppu::UnoType<OUString>::get()); CPPUNIT_ASSERT_MESSAGE( "css::uno::Type", - !(a >>= b) && b == cppu::UnoType<OUString>::get()); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Type", + cppu::UnoType<OUString>::get(), b); } { css::uno::Sequence< OUString > b(2); CPPUNIT_ASSERT_MESSAGE( "css::uno::Sequence<OUString>", - !(a >>= b) && b.getLength() == 2); + !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE( + "css::uno::Sequence<OUString>", + sal_Int32(2), b.getLength()); } { Enum1 b = Enum1_M2; - CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b) && b == Enum1_M2); + CPPUNIT_ASSERT_MESSAGE("Enum1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Enum1", Enum1_M2, b); } { Struct1 b(2); - CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Struct1", !(a >>= b)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Struct1", sal_Int32(2), b.member); } { Exception1 b( OUString(), css::uno::Reference< css::uno::XInterface >(), 2); - CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b) && b.member == 2); + CPPUNIT_ASSERT_MESSAGE("Exception1", !(a >>= b)); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits