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 d2a5b4bc0b

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>
This commit is contained in:
Rene Engelhard 2022-06-10 21:35:43 +02:00 committed by René Engelhard
parent f18b06ca51
commit 69c964bbd5
2 changed files with 9 additions and 9 deletions

View file

@ -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);
}
/**

View file

@ -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: */