diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-03 14:25:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-05 10:41:53 +0100 |
commit | adf0738d2dbfa742d0e9ef130954fb4638a8e90d (patch) | |
tree | 46798a23d0ddd43ec82563b52500ee8ed520857e /tools/qa | |
parent | 24a7df66149a907c2ca2e757927c6c88ecadc523 (diff) |
long->sal_Int32 in BigInt
And fix an issue discovered in the PPT parsing, where one of the
test files has dodgy values that trigger the assert in
BigInt::operator long().
Change-Id: Ic324ac38ecef4153cc434376317643ababe0a537
Reviewed-on: https://gerrit.libreoffice.org/47314
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/qa')
-rw-r--r-- | tools/qa/cppunit/test_bigint.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qa/cppunit/test_bigint.cxx b/tools/qa/cppunit/test_bigint.cxx index 5b2be39c97fb..9e02a609cce6 100644 --- a/tools/qa/cppunit/test_bigint.cxx +++ b/tools/qa/cppunit/test_bigint.cxx @@ -47,7 +47,7 @@ void BigIntTest::testConstructionFromLongLong() CPPUNIT_ASSERT(!bi.IsZero()); CPPUNIT_ASSERT(!bi.IsNeg()); CPPUNIT_ASSERT(bi.IsLong()); - CPPUNIT_ASSERT_EQUAL(42L, static_cast<long>(bi)); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(42), static_cast<sal_Int32>(bi)); } // small negative number @@ -57,7 +57,7 @@ void BigIntTest::testConstructionFromLongLong() CPPUNIT_ASSERT(!bi.IsZero()); CPPUNIT_ASSERT(bi.IsNeg()); CPPUNIT_ASSERT(bi.IsLong()); - CPPUNIT_ASSERT_EQUAL(-42L, static_cast<long>(bi)); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-42), static_cast<sal_Int32>(bi)); } #if SAL_TYPES_SIZEOFLONG < SAL_TYPES_SIZEOFLONGLONG |