summaryrefslogtreecommitdiff
path: root/tools/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-24 16:10:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-24 16:10:54 +0200
commit6a4b976bd0818c2f60b879594d393baad9a0f346 (patch)
treeabaecbb641e42054fa9af2020fcb205962ccfbb2 /tools/qa
parente5eb61954d3aff3952244f76cce2c8bfc44e232a (diff)
Fix Fraction(-2147483648.0) for 32-bit wide long
Change-Id: I6465377de1edff5d0ccc0049fb6d24f6f1223fd2
Diffstat (limited to 'tools/qa')
-rw-r--r--tools/qa/cppunit/test_fract.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/qa/cppunit/test_fract.cxx b/tools/qa/cppunit/test_fract.cxx
index bcc6ad2e7aa5..febece099821 100644
--- a/tools/qa/cppunit/test_fract.cxx
+++ b/tools/qa/cppunit/test_fract.cxx
@@ -90,8 +90,15 @@ public:
#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_TEST_SUITE(FractionTest);
CPPUNIT_TEST(testFraction);
+ CPPUNIT_TEST(testMinLongDouble);
CPPUNIT_TEST_SUITE_END();
};