From 2646023729dd16c1a613fac7e8e6a37828d7a404 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 19 Oct 2020 10:44:14 +0200 Subject: 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 --- tools/qa/cppunit/test_minmax.cxx | 8 ++++---- tools/qa/cppunit/test_rectangle.cxx | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'tools/qa/cppunit') 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(nMin), static_cast(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(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()); } } -- cgit