summaryrefslogtreecommitdiff
path: root/tools/qa
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-16 15:30:32 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-16 17:44:44 +0200
commit582ef22d3e8e30ffd58f092d37ffda30bd07bd9e (patch)
tree80c42b34da7e7ee05843b572f7311b3c230de9dd /tools/qa
parentada4862afc3227b04c12960ded761db24f61257e (diff)
fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing like that. Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
Diffstat (limited to 'tools/qa')
-rw-r--r--tools/qa/cppunit/test_rational.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qa/cppunit/test_rational.cxx b/tools/qa/cppunit/test_rational.cxx
index e503c1c5d38d..c58a8001f4f7 100644
--- a/tools/qa/cppunit/test_rational.cxx
+++ b/tools/qa/cppunit/test_rational.cxx
@@ -33,17 +33,17 @@ public:
void testReduceInaccurate()
{
- const boost::rational<long> aFract(1082130431,1073741824);
+ const boost::rational<sal_Int64> aFract(1082130431,1073741824);
CPPUNIT_ASSERT_MESSAGE( "Fraction #1 not approximately equal to 1.007812499068677",
rtl::math::approxEqual(boost::rational_cast<double>(aFract),1.007812499068677) );
- boost::rational<long> aFract2( aFract );
+ boost::rational<sal_Int64> aFract2( aFract );
rational_ReduceInaccurate(aFract2, 8);
CPPUNIT_ASSERT_MESSAGE( "Fraction #2 not 1",
aFract2.numerator() == 1 &&
aFract2.denominator() == 1 );
- boost::rational<long> aFract3( 0x7AAAAAAA, 0x35555555 );
+ boost::rational<sal_Int64> aFract3( 0x7AAAAAAA, 0x35555555 );
CPPUNIT_ASSERT_MESSAGE( "Fraction #3 cancellation wrong",
aFract3.numerator() == 0x7AAAAAAA &&
aFract3.denominator() == 0x35555555 );
@@ -73,7 +73,7 @@ public:
aFract3.denominator() == 1 );
#if SAL_TYPES_SIZEOFLONG == 8
- boost::rational<long> aFract4(0x7AAAAAAAAAAAAAAA, 0x3555555555555555);
+ boost::rational<sal_Int64> aFract4(0x7AAAAAAAAAAAAAAA, 0x3555555555555555);
CPPUNIT_ASSERT_MESSAGE( "Fraction #4 cancellation wrong",
aFract4.numerator() == 0x7AAAAAAAAAAAAAAA &&
aFract4.denominator() == 0x3555555555555555 );