diff options
author | Juan Picca <jumapico@gmail.com> | 2014-10-24 11:43:52 -0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-10-28 17:15:10 +0000 |
commit | 2ce0aededea43231d91a0955fc0676120dcc4f13 (patch) | |
tree | b255803edc77139ee599146f94889e6c67c48541 /tools/qa/cppunit | |
parent | 8c5f640308b618ec330e83527019a4baa982f902 (diff) |
fdo#81356: use boost::rational internally in Fraction
Change-Id: I6f40eafee7652209395bd471e3508fe3a3d19d73
Reviewed-on: https://gerrit.libreoffice.org/12085
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'tools/qa/cppunit')
-rw-r--r-- | tools/qa/cppunit/test_fract.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/qa/cppunit/test_fract.cxx b/tools/qa/cppunit/test_fract.cxx index febece099821..6352588ef6b2 100644 --- a/tools/qa/cppunit/test_fract.cxx +++ b/tools/qa/cppunit/test_fract.cxx @@ -96,9 +96,16 @@ public: CPPUNIT_ASSERT_EQUAL(1L, f.GetDenominator()); } + void testCreateFromDoubleIn32BitsPlatform() { + // This pass in 64 bits but fail in 32 bits + Fraction f(0.960945); + CPPUNIT_ASSERT_EQUAL(true, f.IsValid()); + } + CPPUNIT_TEST_SUITE(FractionTest); CPPUNIT_TEST(testFraction); CPPUNIT_TEST(testMinLongDouble); + CPPUNIT_TEST(testCreateFromDoubleIn32BitsPlatform); CPPUNIT_TEST_SUITE_END(); }; |