summaryrefslogtreecommitdiff
path: root/tools/qa/cppunit
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-11-14 19:07:41 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-11-14 19:51:56 +0100
commit396196d6143e377f83a81557f4630ac7e7ad9471 (patch)
treec96e933edf85af93b9d686c0aaf93b3302f5e518 /tools/qa/cppunit
parent562df2ad1c5196a36a16eb733371ee8eac4b502a (diff)
BigInt's non-big value type is currently sal_Int32
Change-Id: Iaca11d6279e17cf6301ef35d416829377c0ec964 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105841 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'tools/qa/cppunit')
-rw-r--r--tools/qa/cppunit/test_bigint.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/tools/qa/cppunit/test_bigint.cxx b/tools/qa/cppunit/test_bigint.cxx
index efea3e341235..a91d16f93def 100644
--- a/tools/qa/cppunit/test_bigint.cxx
+++ b/tools/qa/cppunit/test_bigint.cxx
@@ -57,40 +57,38 @@ void BigIntTest::testConstructionFromLongLong()
}
#if SAL_TYPES_SIZEOFLONG < SAL_TYPES_SIZEOFLONGLONG
- // positive number just fitting to long
+ // positive number just fitting to sal_Int32
{
- BigInt bi(static_cast<sal_Int64>(std::numeric_limits<tools::Long>::max()));
+ BigInt bi(static_cast<sal_Int64>(std::numeric_limits<sal_Int32>::max()));
CPPUNIT_ASSERT(bi.IsSet());
CPPUNIT_ASSERT(!bi.IsZero());
CPPUNIT_ASSERT(!bi.IsNeg());
CPPUNIT_ASSERT(bi.IsLong());
- CPPUNIT_ASSERT_EQUAL(std::numeric_limits<tools::Long>::max(), static_cast<tools::Long>(bi));
+ CPPUNIT_ASSERT_EQUAL(std::numeric_limits<sal_Int32>::max(), static_cast<sal_Int32>(bi));
}
- // negative number just fitting to long
+ // negative number just fitting to sal_Int32
{
- BigInt bi(static_cast<sal_Int64>(std::numeric_limits<tools::Long>::min()));
+ BigInt bi(static_cast<sal_Int64>(std::numeric_limits<sal_Int32>::min()));
CPPUNIT_ASSERT(bi.IsSet());
CPPUNIT_ASSERT(!bi.IsZero());
CPPUNIT_ASSERT(bi.IsNeg());
CPPUNIT_ASSERT(bi.IsLong());
- CPPUNIT_ASSERT_EQUAL(std::numeric_limits<tools::Long>::min(), static_cast<tools::Long>(bi));
+ CPPUNIT_ASSERT_EQUAL(std::numeric_limits<sal_Int32>::min(), static_cast<sal_Int32>(bi));
}
- // positive number not fitting to long
+ // positive number not fitting to sal_Int32
{
- BigInt bi(static_cast<sal_Int64>(std::numeric_limits<tools::Long>::max())
- + static_cast<sal_Int64>(1));
+ BigInt bi(static_cast<sal_Int64>(std::numeric_limits<sal_Int32>::max()) + 1);
CPPUNIT_ASSERT(bi.IsSet());
CPPUNIT_ASSERT(!bi.IsZero());
CPPUNIT_ASSERT(!bi.IsNeg());
CPPUNIT_ASSERT(!bi.IsLong());
}
- // negative number not fitting to long
+ // negative number not fitting to sal_Int32
{
- BigInt bi(static_cast<sal_Int64>(std::numeric_limits<tools::Long>::min())
- - static_cast<sal_Int64>(1));
+ BigInt bi(static_cast<sal_Int64>(std::numeric_limits<sal_Int32>::min()) - 1);
CPPUNIT_ASSERT(bi.IsSet());
CPPUNIT_ASSERT(!bi.IsZero());
CPPUNIT_ASSERT(bi.IsNeg());