Kaydet (Commit) d21dd288 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

Improve border equal check in filter tests

With macro the error message will point to the right line.
Check padding distinct.

Change-Id: Id09fbf65350a7a3708923eb07d673068c2943b50
üst 77df2ac9
...@@ -37,6 +37,13 @@ ...@@ -37,6 +37,13 @@
using namespace com::sun::star; using namespace com::sun::star;
#define DEFAULT_STYLE "Default Style" #define DEFAULT_STYLE "Default Style"
#define CPPUNIT_ASSERT_EQUAL_BORDER(aExpected, aActual) \
CPPUNIT_ASSERT_EQUAL(aExpected.Color, aActual.Color); \
CPPUNIT_ASSERT_EQUAL(aExpected.InnerLineWidth, aActual.InnerLineWidth); \
CPPUNIT_ASSERT_EQUAL(aExpected.LineDistance, aActual.LineDistance); \
CPPUNIT_ASSERT_EQUAL(aExpected.LineStyle, aActual.LineStyle); \
CPPUNIT_ASSERT_EQUAL(aExpected.LineWidth, aActual.LineWidth); \
CPPUNIT_ASSERT_EQUAL(aExpected.OuterLineWidth, aActual.OuterLineWidth);
/// Base class for filter tests loading or roundtriping a document, then asserting the document model. /// Base class for filter tests loading or roundtriping a document, then asserting the document model.
class SwModelTestBase : public test::BootstrapFixture, public unotest::MacrosTest class SwModelTestBase : public test::BootstrapFixture, public unotest::MacrosTest
...@@ -347,21 +354,6 @@ protected: ...@@ -347,21 +354,6 @@ protected:
return xCursor->getPage(); return xCursor->getPage();
} }
void assertEqualBorder(
const table::BorderLine2& rLeft, const sal_Int32 nLeftDist,
const table::BorderLine2& rRight, const sal_Int32 nRightDist )
{
// Border
CPPUNIT_ASSERT_EQUAL(rLeft.Color, rRight.Color);
CPPUNIT_ASSERT_EQUAL(rLeft.InnerLineWidth, rRight.InnerLineWidth);
CPPUNIT_ASSERT_EQUAL(rLeft.LineDistance, rRight.LineDistance);
CPPUNIT_ASSERT_EQUAL(rLeft.LineStyle, rRight.LineStyle);
CPPUNIT_ASSERT_EQUAL(rLeft.LineWidth, rRight.LineWidth);
CPPUNIT_ASSERT_EQUAL(rLeft.OuterLineWidth, rRight.OuterLineWidth);
// Padding
CPPUNIT_ASSERT_EQUAL(nLeftDist, nRightDist);
}
uno::Reference<lang::XComponent> mxComponent; uno::Reference<lang::XComponent> mxComponent;
xmlBufferPtr mpXmlBuffer; xmlBufferPtr mpXmlBuffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment