summaryrefslogtreecommitdiff
path: root/tools/qa
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-19 10:44:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-19 12:56:30 +0200
commit2646023729dd16c1a613fac7e8e6a37828d7a404 (patch)
treecba08360a0812ccd3653a6dcfd1cad03704a3724 /tools/qa
parent1086654d6e8cc22f1f99195668db3f305437e570 (diff)
add tools::Long typedef and use it in tools
first step to switching long to a 64-bit type on 64-bit windows Change-Id: I640d807426dfe713c7a8984ef560575f8288dbeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104516 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/qa')
-rw-r--r--tools/qa/cppunit/test_minmax.cxx8
-rw-r--r--tools/qa/cppunit/test_rectangle.cxx24
2 files changed, 16 insertions, 16 deletions
diff --git a/tools/qa/cppunit/test_minmax.cxx b/tools/qa/cppunit/test_minmax.cxx
index 93709def974e..509499910216 100644
--- a/tools/qa/cppunit/test_minmax.cxx
+++ b/tools/qa/cppunit/test_minmax.cxx
@@ -31,8 +31,8 @@ public:
void testSignedMinMax()
{
sal_Int32 nSignedVal = -10;
- long nMin = 1;
- long nMax = 10;
+ tools::Long nMin = 1;
+ tools::Long nMax = 10;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(nMin),
static_cast<sal_Int32>(MinMax(nSignedVal, nMin, nMax)));
@@ -50,8 +50,8 @@ public:
void testUnsignedMinMax()
{
sal_uInt32 nUnsignedVal = 5;
- long nMin = 1;
- long nMax = 10;
+ tools::Long nMin = 1;
+ tools::Long nMax = 10;
CPPUNIT_ASSERT_EQUAL(nUnsignedVal,
static_cast<sal_uInt32>(MinMax(nUnsignedVal, nMin, nMax)));
diff --git a/tools/qa/cppunit/test_rectangle.cxx b/tools/qa/cppunit/test_rectangle.cxx
index 8b10ece6239b..76ab1827f622 100644
--- a/tools/qa/cppunit/test_rectangle.cxx
+++ b/tools/qa/cppunit/test_rectangle.cxx
@@ -30,28 +30,28 @@ void Test::test_rectangle()
{
tools::Rectangle aRect(1,1,1,1);
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetWidth());
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetHeight());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetHeight());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.getWidth());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.getHeight());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect.getWidth());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect.getHeight());
}
{
tools::Rectangle aRect(Point(), Size(1,1));
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.Left());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.Top());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.Right());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.Bottom());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect.Left());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect.Top());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect.Right());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(0), aRect.Bottom());
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetWidth());
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetHeight());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetHeight());
aRect.setX(12);
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetHeight());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetHeight());
aRect.setY(12);
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetWidth());
}
}