summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-01-07 15:03:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-01-09 18:24:49 +0100
commit6e527140e8a75a999db2a35208fb85ab3bb552a8 (patch)
treeaadd28759e8cbed3cf6f436f6b3623c5b9c653d7 /emfio
parenta3fa2c3bad77b976e7f79de5d0f2abc0283e7b3e (diff)
Improve some CPPUNIT_ASSERT checks
(In each case, the name of the file is obvious from the surrounding code, so there's no loss in not having CPPUNIT_ASSERT_LESS/GREATER_MESSAGE available here.) Change-Id: I5e4e1a30f6389f8b2801648a6179b574727f0859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128116 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/qa/cppunit/wmf/wmfimporttest.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/emfio/qa/cppunit/wmf/wmfimporttest.cxx b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
index b7a4dc1badb7..a967930ae5ab 100644
--- a/emfio/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
@@ -123,8 +123,8 @@ void WmfTest::testTdf88163NonPlaceableWmf()
// Mac: With fix: 3230, without fix: ~ 8000
// Windows: With fix: 3303, without fix: ~ 8000
auto x = getXPath(pDoc, "/metafile/push[2]/font[1]", "height");
- CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() > 3000);
- CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() < 3500);
+ CPPUNIT_ASSERT_GREATER(sal_Int32(3000), x.toInt32());
+ CPPUNIT_ASSERT_LESS(sal_Int32(3500), x.toInt32());
// Fails without the fix: Expected: 7359, Actual: 7336
assertXPath(pDoc, "/metafile/push[2]/textarray[1]", "x", "7359");
@@ -161,8 +161,8 @@ void WmfTest::testTdf88163PlaceableWmf()
// The fix does not affect the font size
// Linux: 300 - Mac: 309 - Windows: 316
auto x = getXPath(pDoc, "/metafile/push[2]/font[1]", "height");
- CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() > 290);
- CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() < 320);
+ CPPUNIT_ASSERT_GREATER(sal_Int32(290), x.toInt32());
+ CPPUNIT_ASSERT_LESS(sal_Int32(320), x.toInt32());
// Fails without the fix: Expected: 1900, Actual: 19818
assertXPath(pDoc, "/metafile", "height", "1900");
@@ -368,7 +368,7 @@ void WmfTest::testTdf39894()
// The x position of the second text must take into account
// the previous text's last Dx (previously was ~300)
auto x = getXPath(pDoc, "/metafile/push[2]/textarray[2]", "x");
- CPPUNIT_ASSERT_MESSAGE(file.toUtf8().getStr(), x.toInt32() > 2700);
+ CPPUNIT_ASSERT_GREATER(sal_Int32(2700), x.toInt32());
}
}