[Libreoffice-commits] core.git: basic/qa
Stephan Bergmann
sbergman at redhat.com
Mon Jan 4 05:03:27 PST 2016
basic/qa/cppunit/test_scanner.cxx | 84 +++++++++++++++++++-------------------
1 file changed, 42 insertions(+), 42 deletions(-)
New commits:
commit 38e965fe0fcabffadb8fabe6756313b4f37daad5
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jan 4 14:02:41 2016 +0100
Use CPPUNIT_ASSERT_DOUBLES_EQUAL
...except when checking for infinity
Change-Id: If6e3b8965169cc615fa5d76422e1925866714936
diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx
index 5dd0cd2..ba1320b 100644
--- a/basic/qa/cppunit/test_scanner.cxx
+++ b/basic/qa/cppunit/test_scanner.cxx
@@ -265,7 +265,7 @@ namespace
symbols = getSymbols(source2);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
CPPUNIT_ASSERT(symbols[0].text.isEmpty()); // Can't start symbol with a digit
- CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)(symbols[0].number));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(OUString("asfdasfd"), symbols[1].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type);
@@ -318,7 +318,7 @@ namespace
symbols = getSymbols(source9);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
CPPUNIT_ASSERT(symbols[0].text.isEmpty());
- CPPUNIT_ASSERT_EQUAL(19395u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(19395.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(OUString("asdfa"), symbols[1].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type);
@@ -330,12 +330,12 @@ namespace
CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type);
CPPUNIT_ASSERT(symbols[1].text.isEmpty());
- CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)symbols[1].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type);
CPPUNIT_ASSERT(symbols[3].text.isEmpty());
- CPPUNIT_ASSERT_EQUAL(2u, (unsigned int)symbols[3].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0, symbols[3].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[3].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[4].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[4].type);
@@ -409,7 +409,7 @@ namespace
CPPUNIT_ASSERT_EQUAL(rem, symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type);
CPPUNIT_ASSERT(symbols[1].text.isEmpty());
- CPPUNIT_ASSERT_EQUAL(100u, (unsigned int)symbols[1].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(100.0, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type);
@@ -426,7 +426,7 @@ namespace
CPPUNIT_ASSERT_EQUAL(rem, symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type);
CPPUNIT_ASSERT(symbols[1].text.isEmpty());
- CPPUNIT_ASSERT_EQUAL(1234u, (unsigned int)symbols[1].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1234.0, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type);
CPPUNIT_ASSERT_EQUAL(asdf, symbols[2].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type);
@@ -518,7 +518,7 @@ namespace
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
CPPUNIT_ASSERT_EQUAL(excl, symbols[0].text);
CPPUNIT_ASSERT(symbols[1].text.isEmpty());
- CPPUNIT_ASSERT_EQUAL(1234u, (unsigned int)symbols[1].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1234.0, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
symbols = getSymbols(source3);
@@ -570,44 +570,44 @@ namespace
symbols = getSymbols(source1, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(12345u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12345.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source2, errors);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
- CPPUNIT_ASSERT_EQUAL(rtl::math::round(1.2, 12), rtl::math::round(symbols[0].number, 12));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.2, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
- CPPUNIT_ASSERT_EQUAL(rtl::math::round( .3, 12), rtl::math::round( symbols[1].number, 12));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.3, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[1].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)errors);
symbols = getSymbols(source3, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(rtl::math::round(123.4, 12), rtl::math::round( symbols[0].number, 12));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(123.4, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source4, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(rtl::math::round( .5, 12), rtl::math::round( symbols[0].number, 12));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.5, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source5, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(5u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source6, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
@@ -615,7 +615,7 @@ namespace
symbols = getSymbols(source7, errors);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
CPPUNIT_ASSERT_EQUAL(OUString("-"), symbols[0].text);
- CPPUNIT_ASSERT_EQUAL(3u, (unsigned int)symbols[1].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(3.0, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
@@ -623,14 +623,14 @@ namespace
symbols = getSymbols(source8, errors);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
CPPUNIT_ASSERT_EQUAL(OUString("-"), symbols[0].text);
- CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)symbols[1].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[1].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source9, errors);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
- CPPUNIT_ASSERT_EQUAL(12u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(OUString("dE3"), symbols[1].text);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
@@ -638,40 +638,40 @@ namespace
symbols = getSymbols(source10, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(12000u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12000.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source11, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(12000u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12000.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source12, errors);
CPPUNIT_ASSERT_EQUAL(size_t(6), symbols.size());
- CPPUNIT_ASSERT_EQUAL(12u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(OUString("e"), symbols[1].text);
CPPUNIT_ASSERT_EQUAL(OUString("+"), symbols[2].text);
CPPUNIT_ASSERT_EQUAL(OUString("+"), symbols[3].text);
- CPPUNIT_ASSERT_EQUAL(3u, (unsigned int)symbols[4].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(3.0, symbols[4].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[4].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[5].text);
CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)errors);
symbols = getSymbols(source13, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(rtl::math::round( .012, 12), rtl::math::round( symbols[0].number, 12));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.012, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source14, errors);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
- CPPUNIT_ASSERT_EQUAL(rtl::math::round( .012, 12), rtl::math::round( symbols[0].number, 12));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.012, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(OUString("+"), symbols[1].text);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
@@ -679,20 +679,20 @@ namespace
symbols = getSymbols(source15, errors);
CPPUNIT_ASSERT_EQUAL(size_t(6), symbols.size());
- CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(OUString(","), symbols[1].text);
- CPPUNIT_ASSERT_EQUAL(2u, (unsigned int)symbols[2].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0, symbols[2].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[2].type);
CPPUNIT_ASSERT_EQUAL(OUString(","), symbols[3].text);
- CPPUNIT_ASSERT_EQUAL(3u, (unsigned int)symbols[4].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(3.0, symbols[4].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[4].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[5].text);
CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors);
symbols = getSymbols(source16, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
// This error is from a "buffer overflow" which is stupid because
@@ -703,7 +703,7 @@ namespace
rtl::math::setInf( &fInf, false);
symbols = getSymbols(source17, errors);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(rtl::math::round( fInf, 12), rtl::math::round( symbols[0].number, 12));
+ CPPUNIT_ASSERT_EQUAL(fInf, symbols[0].number);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)errors); // math error, overflow
@@ -773,64 +773,64 @@ namespace
symbols = getSymbols(source1);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(10u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
symbols = getSymbols(source2);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(2783u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2783.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
symbols = getSymbols(source3);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(16u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(16.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
symbols = getSymbols(source4);
CPPUNIT_ASSERT_EQUAL(size_t(6), symbols.size());
- CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString("&"), symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type);
- CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)symbols[1].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[1].text);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type);
- CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)symbols[2].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[2].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[2].text);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[2].type);
- CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)symbols[3].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[3].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString("H1"), symbols[3].text);
CPPUNIT_ASSERT_EQUAL(SbxLONG, symbols[3].type);
- CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)symbols[4].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[4].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString("H1"), symbols[4].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[4].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[5].text);
symbols = getSymbols(source5);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
- CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
- CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)symbols[1].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString("O12"), symbols[1].text);
CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
symbols = getSymbols(source6);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(8u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(8.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
symbols = getSymbols(source7);
CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size());
- CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text);
CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text);
@@ -844,9 +844,9 @@ namespace
symbols = getSymbols(source9);
CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size());
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text);
- CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)symbols[0].number);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[0].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type);
- CPPUNIT_ASSERT_EQUAL(rtl::math::round( .23, 12), rtl::math::round( symbols[1].number, 12));
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.23, symbols[1].number, 1E-12);
CPPUNIT_ASSERT_EQUAL(OUString(), symbols[1].text);
CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[1].type);
CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text);
More information about the Libreoffice-commits
mailing list