svx/qa/unit/svdraw.cxx | 10 +++++----- tools/qa/cppunit/test_xpath.cxx | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-)
New commits: commit b708490b2dfcbe6d9e5485664683da07a51ad50e Author: Mike Kaganski <[email protected]> AuthorDate: Tue Dec 23 12:10:57 2025 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Dec 23 10:43:00 2025 +0100 Fix Windows build, where sal_Int32 != int ... after commit 99354e5cb0abb025c0ee980676bf0e37822c8119 (introduce tools::XPath to be able to reuse the result after call, 2025-12-22). Change-Id: I2b096c027dfe1e71e7a74906b3b03ab3a895679b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196147 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx index 8c50855e1924..fe20d0d42b0f 100644 --- a/svx/qa/unit/svdraw.cxx +++ b/svx/qa/unit/svdraw.cxx @@ -339,7 +339,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject) auto aPolyPolyPath = aPath.create(aPolyPoly, "/polypolygon"); CPPUNIT_ASSERT(aPolyPolyPath); - CPPUNIT_ASSERT_EQUAL(1, aPolyPolyPath->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aPolyPolyPath->count()); auto aPolyPolyElement = aPolyPolyPath->at(0); CPPUNIT_ASSERT_EQUAL(u"99"_ustr, aPolyPolyElement->attribute( "height")); // weird Rectangle is created with size 100 @@ -353,7 +353,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject) = aPath.create("/primitive2D/sdrrectangle/group/polypolygoncolor/polypolygon/polygon"); CPPUNIT_ASSERT(aPolyPath); auto aPoints = aPath.create(aPolyPath, "/point"); - CPPUNIT_ASSERT_EQUAL(5, aPoints->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aPoints->count()); CPPUNIT_ASSERT_EQUAL(u"49.5"_ustr, aPoints->at(0)->attribute("x")); CPPUNIT_ASSERT_EQUAL(u"99"_ustr, aPoints->at(0)->attribute("y")); CPPUNIT_ASSERT_EQUAL(u"0"_ustr, aPoints->at(1)->attribute("x")); @@ -367,7 +367,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject) auto aStrokePath = aPath.create("/primitive2D/sdrrectangle/group/polygonstroke"); CPPUNIT_ASSERT(aStrokePath); - CPPUNIT_ASSERT_EQUAL(1, aStrokePath->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aStrokePath->count()); auto aLinePath = aPath.create(aStrokePath, "/line"); CPPUNIT_ASSERT_EQUAL(u"#3465a4"_ustr, aLinePath->attribute("color")); @@ -379,7 +379,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testRectangleObject) CPPUNIT_ASSERT_EQUAL(u"49.5,99 0,99 0,0 99,0 99,99"_ustr, aLineContentPath->content()); // If solid line, then there is no line stroke information - CPPUNIT_ASSERT_EQUAL(0, aPath.create(aStrokePath, "/stroke")->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aPath.create(aStrokePath, "/stroke")->count()); pPage->RemoveObject(0); } @@ -427,7 +427,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testFontWorks) xmlDocUniquePtr pXmlDoc = lcl_dumpAndParseFirstObjectWithAssert(pSdrPage); tools::XPath aXPath(pXmlDoc.get()); - CPPUNIT_ASSERT_EQUAL(1, aXPath.create("/primitive2D")->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aXPath.create("/primitive2D")->count()); CPPUNIT_ASSERT_EQUAL(u"Perspective"_ustr, aXPath.create("//scene")->attribute("projectionMode")); diff --git a/tools/qa/cppunit/test_xpath.cxx b/tools/qa/cppunit/test_xpath.cxx index 03726b2dc869..d15a29e5dbce 100644 --- a/tools/qa/cppunit/test_xpath.cxx +++ b/tools/qa/cppunit/test_xpath.cxx @@ -44,16 +44,16 @@ public: tools::XPath aXPath(pXmlDoc.get()); auto aNonExistentPath = aXPath.create("/nonexistent"); CPPUNIT_ASSERT(aNonExistentPath); - CPPUNIT_ASSERT_EQUAL(0, aNonExistentPath->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aNonExistentPath->count()); auto aRootResult = aXPath.create("/root"); CPPUNIT_ASSERT(aRootResult); - CPPUNIT_ASSERT_EQUAL(1, aRootResult->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRootResult->count()); CPPUNIT_ASSERT_EQUAL(u"Hello World"_ustr, aRootResult->attribute("root-attr")); { auto aRootElement = aRootResult->at(0); CPPUNIT_ASSERT_EQUAL(std::string_view("root"), aRootElement->name()); - CPPUNIT_ASSERT_EQUAL(4, aRootElement->countChildren()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(4), aRootElement->countChildren()); CPPUNIT_ASSERT_EQUAL(std::string_view("child"), aRootElement->at(0)->name()); CPPUNIT_ASSERT_EQUAL(std::string_view("child"), aRootElement->at(1)->name()); CPPUNIT_ASSERT_EQUAL(std::string_view("child"), aRootElement->at(2)->name()); @@ -62,7 +62,7 @@ public: auto aChildResult = aXPath.create(aRootResult, "/child"); CPPUNIT_ASSERT(aChildResult); - CPPUNIT_ASSERT_EQUAL(3, aChildResult->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), aChildResult->count()); auto aChildElement = aChildResult->at(0); CPPUNIT_ASSERT_EQUAL(std::string_view("child"), aChildElement->name()); @@ -78,7 +78,7 @@ public: auto aGrandChildResult = aXPath.create(aRootResult, "/child[1]/grandchild"); CPPUNIT_ASSERT(aGrandChildResult); - CPPUNIT_ASSERT_EQUAL(1, aGrandChildResult->count()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aGrandChildResult->count()); CPPUNIT_ASSERT_EQUAL(u"Content"_ustr, aGrandChildResult->content()); CPPUNIT_ASSERT_EQUAL(u"ABC"_ustr, aGrandChildResult->attribute("attribute1")); CPPUNIT_ASSERT_EQUAL(u"CDE"_ustr, aGrandChildResult->attribute("attribute2"));
