[Libreoffice-commits] .: sc/qa

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Jan 14 15:27:32 PST 2011


 sc/qa/unit/ucalc.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 59857f3108e63e7399c4b4b8d035e9f3c576b91f
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Jan 14 18:26:02 2011 -0500

    Test on collator, which fails only during the unit test run.
    
    The data pilot test relies on the collator being available.  But
    for some reason it's not.  We need to get this working during the
    unit test run in order to be able to test many other calc
    functionalities.

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 162c597..f2da784 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -97,6 +97,7 @@ public:
     virtual void setUp();
     virtual void tearDown();
 
+    void testCollator();
     void testSUM();
     void testNamedRange();
     void testCSV();
@@ -105,6 +106,7 @@ public:
     void testSheetCopy();
 
     CPPUNIT_TEST_SUITE(Test);
+    CPPUNIT_TEST(testCollator);
     CPPUNIT_TEST(testSUM);
     CPPUNIT_TEST(testNamedRange);
     CPPUNIT_TEST(testCSV);
@@ -151,6 +153,17 @@ Test::~Test()
     uno::Reference< lang::XComponent >(m_xContext, uno::UNO_QUERY_THROW)->dispose();
 }
 
+void Test::testCollator()
+{
+#if 0 // This currently fails, and because of this the data pilot test fails too.
+    OUString s1(RTL_CONSTASCII_USTRINGPARAM("A"));
+    OUString s2(RTL_CONSTASCII_USTRINGPARAM("B"));
+    CollatorWrapper* p = ScGlobal::GetCollator();
+    sal_Int32 nRes = p->compareString(s1, s2);
+    CPPUNIT_ASSERT_MESSAGE("these strings are supposed to be different!", nRes != 0);
+#endif
+}
+
 void Test::testSUM()
 {
     rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("foo"));


More information about the Libreoffice-commits mailing list