diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-21 06:21:24 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-04-21 06:44:25 +0200 |
commit | e60a0b4f768bc5b7f162b290aae20aa07e278123 (patch) | |
tree | d3ec28ce6cc1481324307616413b85ddf756e70a /chart2/qa/extras/chart2export.cxx | |
parent | c5402612bb6375d03786f1e9983cb605a3ac4c02 (diff) |
improve assertion messages
Change-Id: Ic3c83e670472a8882eddf8b4d29cf148a8e73d0d
Diffstat (limited to 'chart2/qa/extras/chart2export.cxx')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 42dd125a4986..2c5b8ec97eab 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -761,9 +761,9 @@ void Chart2ExportTest::testDataLabelBordersDOCX() Sequence<sal_Int32> aIndices; xPropSet->getPropertyValue("AttributedDataPoints") >>= aIndices; - CPPUNIT_ASSERT_MESSAGE("There should be 2 data points with local properties.", aIndices.getLength() == 2); - CPPUNIT_ASSERT(aIndices[0] == 0); - CPPUNIT_ASSERT(aIndices[1] == 2); + CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be 2 data points with local properties.", sal_Int32(2), aIndices.getLength()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aIndices[0]); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aIndices[1]); const Check aDataPoints[] = { @@ -778,7 +778,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX() css::drawing::LineStyle eLineStyle = css::drawing::LineStyle_NONE; xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_STYLE) >>= eLineStyle; - CPPUNIT_ASSERT(eLineStyle == aDataPoints[i].meStyle); + CPPUNIT_ASSERT_EQUAL(aDataPoints[i].meStyle, eLineStyle); sal_Int32 nWidth = -1; xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_WIDTH) >>= nWidth; @@ -786,7 +786,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX() sal_Int32 nColor = -1; xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_COLOR) >>= nColor; - CPPUNIT_ASSERT_MESSAGE("Border color is wrong.", nColor == aDataPoints[i].mnColor); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Border color is wrong.", aDataPoints[i].mnColor, nColor); } } @@ -805,7 +805,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX() css::drawing::LineStyle eLineStyle = css::drawing::LineStyle_NONE; xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_STYLE) >>= eLineStyle; - CPPUNIT_ASSERT(eLineStyle == css::drawing::LineStyle_SOLID); + CPPUNIT_ASSERT_EQUAL(css::drawing::LineStyle_SOLID, eLineStyle); sal_Int32 nWidth = -1; xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_WIDTH) >>= nWidth; @@ -813,7 +813,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX() sal_Int32 nColor = -1; xPropSet->getPropertyValue(CHART_UNONAME_LABEL_BORDER_COLOR) >>= nColor; - CPPUNIT_ASSERT_MESSAGE("Border color should be green.", nColor == 0x0000FF00); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Border color should be green.", sal_Int32(0x0000FF00), nColor); } } aTest; |