diff options
author | Rene Engelhard <rene@rene-engelhard.de> | 2022-06-10 21:35:43 +0200 |
---|---|---|
committer | René Engelhard <rene@debian.org> | 2022-06-11 09:07:44 +0200 |
commit | 69c964bbd56ff49324d1ca649739fae354dd4c16 (patch) | |
tree | c091a407e93d1cbb2ac14328174cb9848fb138a1 /toolkit | |
parent | f18b06ca5108d9e4f4bcfe0081bc1017acdef76d (diff) |
fix 32bit build in new a11y cppunit tests
/<<PKGBUILDDIR>>/toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx: In member function ‘void XAccessibleComponentTester::testBounds()’:
/<<PKGBUILDDIR>>/toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx:51:5: error: no matching function for call to ‘assertGreaterEqual(int, sal_Int32&, CppUnit::SourceLine, const char [1])’
51 | CPPUNIT_ASSERT_GREATEREQUAL(0, bounds.X);
| ^
/usr/include/cppunit/TestAssert.h:251:6: note: candidate: ‘template<class T> void CppUnit::assertGreaterEqual(const T&, const T&, CppUnit::SourceLine, const string&)’
251 | void assertGreaterEqual( const T& expected,
| ^~~~~~~~~~~~~~~~~~
/usr/include/cppunit/TestAssert.h:251:6: note: template argument deduction/substitution failed:
/<<PKGBUILDDIR>>/toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx:51:5: note: deduced conflicting types for parameter ‘const T’ (‘int’ and ‘sal_Int32’ {aka ‘long int’})
51 | CPPUNIT_ASSERT_GREATEREQUAL(0, bounds.X);
| ^
etc.
Regression from d2a5b4bc0b8c8d1dd82133719a3ef5cc01b0cbbe
Change-Id: I123894e5ed6d6f3bcf46b1c5b37f1f49cb5f9f99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135630
Tested-by: Jenkins
Tested-by: René Engelhard <rene@debian.org>
Reviewed-by: René Engelhard <rene@debian.org>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx | 8 | ||||
-rw-r--r-- | toolkit/qa/cppunit/a11y/XAccessibleContextTester.cxx | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx b/toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx index 5613724786b9..ea46ff778575 100644 --- a/toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx +++ b/toolkit/qa/cppunit/a11y/XAccessibleComponentTester.cxx @@ -48,10 +48,10 @@ void XAccessibleComponentTester::testBounds() auto bounds = mxComponent->getBounds(); std::cout << "bounds: " << bounds.Width << "x" << bounds.Height << std::showpos << bounds.X << bounds.Y << std::noshowpos << std::endl; - CPPUNIT_ASSERT_GREATEREQUAL(0, bounds.X); - CPPUNIT_ASSERT_GREATEREQUAL(0, bounds.Y); - CPPUNIT_ASSERT_GREATER(0, bounds.Width); - CPPUNIT_ASSERT_GREATER(0, bounds.Height); + CPPUNIT_ASSERT_GREATEREQUAL(static_cast<sal_Int32>(0), bounds.X); + CPPUNIT_ASSERT_GREATEREQUAL(static_cast<sal_Int32>(0), bounds.Y); + CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(0), bounds.Width); + CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(0), bounds.Height); } /** diff --git a/toolkit/qa/cppunit/a11y/XAccessibleContextTester.cxx b/toolkit/qa/cppunit/a11y/XAccessibleContextTester.cxx index 3a7eb70e9dd5..b8c7898f963f 100644 --- a/toolkit/qa/cppunit/a11y/XAccessibleContextTester.cxx +++ b/toolkit/qa/cppunit/a11y/XAccessibleContextTester.cxx @@ -57,7 +57,7 @@ void XAccessibleContextTester::testGetAccessibleChildCount() { auto childCount = mxContext->getAccessibleChildCount(); std::cout << childCount << " children found." << std::endl; - CPPUNIT_ASSERT_GREATEREQUAL(0, childCount); + CPPUNIT_ASSERT_GREATEREQUAL(static_cast<sal_Int32>(0), childCount); } /** @@ -130,10 +130,10 @@ void XAccessibleContextTester::testGetAccessibleRelationSet() */ void XAccessibleContextTester::testGetAccessibleRole() { - sal_Int16 role = mxContext->getAccessibleRole(); + sal_Int32 role = mxContext->getAccessibleRole(); std::cout << "The role is " << role << " (" << AccessibilityTools::getRoleName(role) << ")" << std::endl; - CPPUNIT_ASSERT_GREATEREQUAL(static_cast<sal_Int16>(0), role); + CPPUNIT_ASSERT_GREATEREQUAL(static_cast<sal_Int32>(0), role); } /** @@ -157,8 +157,8 @@ void XAccessibleContextTester::testGetLocale() { auto loc = mxContext->getLocale(); std::cout << "The locale is " << loc.Language << "," << loc.Country << std::endl; - CPPUNIT_ASSERT_GREATER(0, loc.Language.getLength()); - CPPUNIT_ASSERT_GREATER(0, loc.Country.getLength()); + CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(0), loc.Language.getLength()); + CPPUNIT_ASSERT_GREATER(static_cast<sal_Int32>(0), loc.Country.getLength()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |