[Libreoffice-commits] .: 3 commits - sal/workben
Caolán McNamara
caolan at kemper.freedesktop.org
Sat Jan 15 13:24:32 PST 2011
sal/workben/measure_oustrings.cxx | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
New commits:
commit bc93c74e20016d9972e1739917638c0a4aa63ae9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jan 15 21:21:50 2011 +0000
drop two arg one from this test, because it has different semantics
diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx
index be54cbd..f9ce02b 100644
--- a/sal/workben/measure_oustrings.cxx
+++ b/sal/workben/measure_oustrings.cxx
@@ -228,20 +228,15 @@ SAL_IMPLEMENT_MAIN()
sCompare.equalsAscii("apple");
)
+ //(const sal_Char*, sal_Int32) version has different semantics
TIME
(
- "rtl::OUString::compareToAscii (one arg) (!=0)",
+ "rtl::OUString::compareToAscii (const sal_Char*)",
sCompare.compareToAscii("apple");
)
TIME
(
- "rtl::OUString::compareToAscii (two args) (!=0)",
- sCompare.compareToAscii(RTL_CONSTASCII_STRINGPARAM("apple"));
- )
-
- TIME
- (
"operator==(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM_CLASSIC(\"apple\")))",
sCompare == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM_CLASSIC("apple"));
)
@@ -264,19 +259,14 @@ SAL_IMPLEMENT_MAIN()
TIME
(
- "rtl::OUString::compareToAscii (two args) (==0)",
- sCompare.compareToAscii(RTL_CONSTASCII_STRINGPARAM("XXXXXXXXXXXXXXX"));
- )
-
- TIME
- (
"rtl::OUString::equalsAscii",
sCompare.equalsAscii("XXXXXXXXXXXXXXX");
)
+ //(const sal_Char*, sal_Int32) version has different semantics
TIME
(
- "rtl::OUString::compareToAscii (one arg) (==0)",
+ "rtl::OUString::compareToAscii (const sal_Char*)",
sCompare.compareToAscii("XXXXXXXXXXXXXXX");
)
commit e8681912a3bd1224defc498ca2b7782bbca20da0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jan 15 21:17:29 2011 +0000
fix test name
diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx
index bf0e8e7..be54cbd 100644
--- a/sal/workben/measure_oustrings.cxx
+++ b/sal/workben/measure_oustrings.cxx
@@ -246,7 +246,7 @@ SAL_IMPLEMENT_MAIN()
sCompare == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM_CLASSIC("apple"));
)
- std::cout << "--Ascii Unequal Comparison--" << std::endl;
+ std::cout << "--Ascii Equal Comparison--" << std::endl;
TIME
(
commit 33640e9863b00f0c40559cedf0ddde369ff988a9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jan 15 21:14:20 2011 +0000
and test with a precreated string
diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx
index 57e7681..bf0e8e7 100644
--- a/sal/workben/measure_oustrings.cxx
+++ b/sal/workben/measure_oustrings.cxx
@@ -214,6 +214,14 @@ SAL_IMPLEMENT_MAIN()
sCompare.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("apple"));
)
+ rtl::OUString sUnequalCompareTo(RTL_CONSTASCII_USTRINGPARAM_CLASSIC("apple"));
+
+ TIME
+ (
+ "operator==(precreated OUString(\"apple\"))",
+ sCompare == sUnequalCompareTo;
+ )
+
TIME
(
"rtl::OUString::equalsAscii",
@@ -246,6 +254,14 @@ SAL_IMPLEMENT_MAIN()
sCompare.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("XXXXXXXXXXXXXXX"));
)
+ rtl::OUString sEqualCompareTo(RTL_CONSTASCII_USTRINGPARAM_CLASSIC("XXXXXXXXXXXXXXX"));
+
+ TIME
+ (
+ "operator==(precreated OUString(\"XXXXXXXXXXXXXXX\"))",
+ sCompare == sEqualCompareTo;
+ )
+
TIME
(
"rtl::OUString::compareToAscii (two args) (==0)",
More information about the Libreoffice-commits
mailing list