[Libreoffice-commits] core.git: tools/qa
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 14 18:52:46 UTC 2020
tools/qa/cppunit/test_bigint.cxx | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
New commits:
commit 396196d6143e377f83a81557f4630ac7e7ad9471
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Nov 14 19:07:41 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Nov 14 19:51:56 2020 +0100
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 at collabora.com>
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());
More information about the Libreoffice-commits
mailing list