Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3663

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/63/3663/1

replaced compareTo with ==

Change-Id: I260386aa087d9283b536970547f518583f6b10b4
---
M sal/qa/rtl_strings/rtl_old_testowstring.cxx
1 file changed, 13 insertions(+), 13 deletions(-)



diff --git a/sal/qa/rtl_strings/rtl_old_testowstring.cxx 
b/sal/qa/rtl_strings/rtl_old_testowstring.cxx
index f23287a..d4dc006 100644
--- a/sal/qa/rtl_strings/rtl_old_testowstring.cxx
+++ b/sal/qa/rtl_strings/rtl_old_testowstring.cxx
@@ -89,7 +89,7 @@
     s1 = s4.copy(0, 39);
     OUString s5;
     s5 = s1 + OUString(" aus der RTL Library\n");
-    TEST_ENSURE( s5.compareTo(s4) == 0 , "test_OWString error 12");
+    TEST_ENSURE( s5==s4 , "test_OWString error 12");
     TEST_ENSURE( s5.indexOf(OUString("RTL")) == 12, "test_OWString error 13");
     TEST_ENSURE( s5.lastIndexOf(OUString("RTL")) == 48, "test_OWString error 13");
 
@@ -97,10 +97,10 @@
     OUString s6 = s5.valueOf(b);
 //  TEST_ENSURE( s6.compareTo(OUString("False")) == 0, "test_OWString error 14");
     s6 = s5.valueOf((sal_Unicode)'H');
-    TEST_ENSURE( s6.compareTo(OUString("H")) == 0, "test_OWString error 15");
+    TEST_ENSURE( s6 == OUString("H"), "test_OWString error 15");
     sal_Int32 n = 123456789L;
     s6 = s5.valueOf(n);
-    TEST_ENSURE( s6.compareTo(OUString("123456789")) == 0, "test_OWString error 16");
+    TEST_ENSURE( s6 == OUString("123456789"), "test_OWString error 16");
 
 #ifdef SAL_UNX
     sal_Int64 m = -3223372036854775807LL;
@@ -108,7 +108,7 @@
     sal_Int64 m = -3223372036854775807;
 #endif
     s6 = s5.valueOf(m);
-    TEST_ENSURE( s6.compareTo( OUString("-3223372036854775807") ) == 0, "test_OWString error 17");
+    TEST_ENSURE( s6 ==  OUString("-3223372036854775807"), "test_OWString error 17");
 
      OUString s7;
     OUString s8(OUString("HALLO ICH BIN EIN SS"));
@@ -141,14 +141,14 @@
     //index   0    5    10   15   20   25   30   35   40   45   50   55
     s8 = OUString("Ich bin ein String mit einem A und C und vielen m, m, m, m");
 
-    TEST_ENSURE( OUString("aaa").compareTo( OUString("bbb") ) < 0, "test_OWString error 46" );
-    TEST_ENSURE( OUString("aaa").compareTo( OUString("aaa") ) == 0, "test_OWString error 46" );
-    TEST_ENSURE( OUString("bbb").compareTo( OUString("aaa") ) > 0, "test_OWString error 47" );
-    TEST_ENSURE( OUString("aaaa").compareTo( OUString("bbb") ) < 0, "test_OWString error 48" );
-    TEST_ENSURE( OUString("aaa").compareTo( OUString("bbbb") ) < 0, "test_OWString error 49" );
-    TEST_ENSURE( OUString("aaa").compareTo( OUString("aaaa") ) < 0, "test_OWString error 50" );
-    TEST_ENSURE( OUString("aaaa").compareTo( OUString("aaa") ) > 0, "test_OWString error 51" );
-    TEST_ENSURE( OUString("bbbb").compareTo( OUString("bbb") ) > 0, "test_OWString error 52" );
+    TEST_ENSURE( OUString("aaa") < OUString("bbb") , "test_OWString error 46" );
+    TEST_ENSURE( OUString("aaa") == OUString("aaa") , "test_OWString error 46" );
+    TEST_ENSURE( OUString("bbb") > OUString("aaa") , "test_OWString error 47" );
+    TEST_ENSURE( OUString("aaaa") < OUString("bbb") , "test_OWString error 48" );
+    TEST_ENSURE( OUString("aaa") < OUString("bbbb")  , "test_OWString error 49" );
+    TEST_ENSURE( OUString("aaa") < ( OUString("aaaa") , "test_OWString error 50" );
+    TEST_ENSURE( OUString("aaaa") > ( OUString("aaa") , "test_OWString error 51" );
+    TEST_ENSURE( OUString("bbbb") > ( OUString("bbb") ) , "test_OWString error 52" );
     TEST_ENSURE( OUString("bbb") == OUString("bbb"), "test_OWString error 53" );
     TEST_ENSURE( OUString("bbb") == OUString("bbb"), "test_OWString error 54" );
 
@@ -168,7 +168,7 @@
     s7 = OUString("Hallo jetzt komm ich");
     s8 = s7.copy(0, s7.indexOf((sal_Unicode)':'));
     TEST_ENSURE( s8.isEmpty(), "test_OWString error 55");
-    TEST_ENSURE( s8.compareTo(OUString()) == 0, "test_OWString error 56");
+    TEST_ENSURE( s8 == OUString(), "test_OWString error 56");
 #endif
 
     // ASCII-Schnittstellen, AB 15.10.1999

-- 
To view, visit https://gerrit.libreoffice.org/3663
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I260386aa087d9283b536970547f518583f6b10b4
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Pooja Ahuja <ahuja.pooja22@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.