From 6a4b976bd0818c2f60b879594d393baad9a0f346 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 24 Oct 2014 16:10:26 +0200 Subject: Fix Fraction(-2147483648.0) for 32-bit wide long Change-Id: I6465377de1edff5d0ccc0049fb6d24f6f1223fd2 --- tools/qa/cppunit/test_fract.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/qa') 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(); }; -- cgit