summaryrefslogtreecommitdiff
path: root/tools/qa/cppunit/test_fract.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qa/cppunit/test_fract.cxx')
-rw-r--r--tools/qa/cppunit/test_fract.cxx19
1 files changed, 2 insertions, 17 deletions
diff --git a/tools/qa/cppunit/test_fract.cxx b/tools/qa/cppunit/test_fract.cxx
index 6352588ef6b2..12977b5635f8 100644
--- a/tools/qa/cppunit/test_fract.cxx
+++ b/tools/qa/cppunit/test_fract.cxx
@@ -73,27 +73,12 @@ public:
aFract3.GetNumerator() == 2 &&
aFract3.GetDenominator() == 1 );
-#if SAL_TYPES_SIZEOFLONG == 8
- Fraction aFract4(0x7AAAAAAAAAAAAAAA, 0x3555555555555555);
- CPPUNIT_ASSERT_MESSAGE( "Fraction #4 cancellation wrong",
- aFract4.GetNumerator() == 0x7AAAAAAAAAAAAAAA &&
- aFract4.GetDenominator() == 0x3555555555555555 );
- aFract4.ReduceInaccurate(62);
- CPPUNIT_ASSERT_MESSAGE( "Fraction #4 ReduceInaccurate errorneously cut precision",
- aFract4.GetNumerator() == 0x7AAAAAAAAAAAAAAA &&
- aFract4.GetDenominator() == 0x3555555555555555 );
-
- aFract4.ReduceInaccurate(61);
- CPPUNIT_ASSERT_MESSAGE( "Fraction #4 ReduceInaccurate reduce to 61 bit failed",
- aFract4.GetNumerator() == 0x3D55555555555555 &&
- aFract4.GetDenominator() == 0x1AAAAAAAAAAAAAAA );
-#endif
}
void testMinLongDouble() {
Fraction f(double(SAL_MIN_INT32));
- CPPUNIT_ASSERT_EQUAL(long(SAL_MIN_INT32), f.GetNumerator());
- CPPUNIT_ASSERT_EQUAL(1L, f.GetDenominator());
+ CPPUNIT_ASSERT_EQUAL(SAL_MIN_INT32, f.GetNumerator());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), f.GetDenominator());
}
void testCreateFromDoubleIn32BitsPlatform() {