[Libreoffice-commits] core.git: 2 commits - sax/qa

Lionel Elie Mamane lionel at mamane.lu
Sat Aug 3 17:00:06 PDT 2013


 sax/qa/cppunit/test_converter.cxx |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit aa5683e18de07c9e86325595ead4574efa685c3a
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sun Aug 4 00:56:01 2013 +0200

    fixup SAL_INFO macros to actually print the strings
    
    Change-Id: I26bf8376d27f7fcbf8a83b7356d252dce9061fcb

diff --git a/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx
index 4da46e9..28eefd9 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -105,7 +105,7 @@ static void doTest(util::Duration const & rid, char const*const pis,
     CPPUNIT_ASSERT(eqDuration(rid, od));
     OUStringBuffer buf;
     Converter::convertDuration(buf, od);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT(buf.makeStringAndClear().equalsAscii(pos));
 }
 
@@ -174,7 +174,7 @@ static void doTest(util::DateTime const & rdt, char const*const pis,
     CPPUNIT_ASSERT(eqDateTime(rdt, odt));
     OUStringBuffer buf;
     Converter::convertDateTime(buf, odt, 0, true);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(pos),
                          buf.makeStringAndClear());
 }
@@ -265,7 +265,7 @@ void doTestDouble(char const*const pis, double const rd,
     CPPUNIT_ASSERT_DOUBLES_EQUAL(rd, od, 0.00000001);
     OUStringBuffer buf;
     Converter::convertDouble(buf, od, true, nTargetUnit, nSourceUnit);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
 }
 
@@ -336,7 +336,7 @@ void doTestMeasureToString(char const*const pis, sal_Int32 nMeasure, sal_Int16 c
     OUString const is(OUString::createFromAscii(pis));
     OUStringBuffer buf;
     Converter::convertMeasure(buf, nMeasure, nSourceUnit, nTargetUnit);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
 }
 
@@ -400,7 +400,7 @@ void doTestBoolToString(char const*const pis, bool bValue )
     OUString const is(OUString::createFromAscii(pis));
     OUStringBuffer buf;
     Converter::convertBool(buf, bValue);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
 }
 
@@ -427,7 +427,7 @@ void doTestPercentToString(char const*const pis, sal_Int32 nValue)
     OUString const is(OUString::createFromAscii(pis));
     OUStringBuffer buf;
     Converter::convertPercent(buf, nValue);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
 }
 
@@ -459,7 +459,7 @@ void doTestColorToString(char const*const pis, sal_Int32 nValue)
     OUString const is(OUString::createFromAscii(pis));
     OUStringBuffer buf;
     Converter::convertColor(buf, nValue);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
 }
 
@@ -490,7 +490,7 @@ void doTestNumberToString(char const*const pis, sal_Int32 nValue)
     OUString const is(OUString::createFromAscii(pis));
     OUStringBuffer buf;
     Converter::convertNumber(buf, nValue);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
 }
 
@@ -513,7 +513,7 @@ void doTestEncodeBase64(char const*const pis, const uno::Sequence<sal_Int8> aPas
     OUString const is(OUString::createFromAscii(pis));
     OUStringBuffer buf;
     Converter::encodeBase64(buf, aPass);
-    SAL_INFO("sax.cppunit","" << buf.getStr());
+    SAL_INFO("sax.cppunit","" << buf.toString());
     CPPUNIT_ASSERT_EQUAL(is, buf.makeStringAndClear());
 }
 
@@ -522,7 +522,7 @@ void doTestDecodeBase64(const uno::Sequence<sal_Int8> aPass, char const*const pi
     OUString const is(OUString::createFromAscii(pis));
     uno::Sequence< sal_Int8 > tempSequence;
     Converter::decodeBase64(tempSequence, is);
-    SAL_INFO("sax.cppunit","" << is.getStr());
+    SAL_INFO("sax.cppunit","" << is);
     bool b = (tempSequence==aPass);
     CPPUNIT_ASSERT(b);
 }
commit 68a4d1f755bf782795c658565dd24fede6ca63b0
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sun Aug 4 00:54:47 2013 +0200

    sax converter unittest: test accept trailing zeros in fractional seconds
    
    Change-Id: I3b6080df1cf8c13b5c0781c34c7806ac3c2cfbc7

diff --git a/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx
index b1cb070..4da46e9 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -135,7 +135,7 @@ void ConverterTest::testDuration()
             "PT9.999999999999999999999999999999S", "PT9.999999999S" );
     doTest( util::Duration(true , 0, 0, 9999, 0, 0, 0, 0), "-P9999D" );
     doTest( util::Duration(true , 7, 6, 5, 4, 3, 2,  10000000),
-            "-P7Y6M5DT4H3M2.01S", "-P7Y6M5DT4H3M2.010000000S" );
+            "-P7Y6M5DT4H3M2.01000S", "-P7Y6M5DT4H3M2.010000000S" );
     doTest( util::Duration(false, 0, 6, 0, 0, 3, 0, 0), "P6MT3M" );
     doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 0), "P0D" );
     doTestDurationF("1Y1M");        // invalid: no ^P


More information about the Libreoffice-commits mailing list