summaryrefslogtreecommitdiff
path: root/comphelper/qa/string
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/qa/string')
-rw-r--r--comphelper/qa/string/test_string.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx
index d7187e04fd75..21d84c9142fe 100644
--- a/comphelper/qa/string/test_string.cxx
+++ b/comphelper/qa/string/test_string.cxx
@@ -48,6 +48,7 @@ public:
void testDecimalStringToNumber();
void testIsdigitAsciiString();
void testIsalnumAsciiString();
+ void testIsupperAsciiString();
CPPUNIT_TEST_SUITE(TestString);
CPPUNIT_TEST(testSearchAndReplaceAsciiL);
@@ -57,6 +58,7 @@ public:
CPPUNIT_TEST(testDecimalStringToNumber);
CPPUNIT_TEST(testIsdigitAsciiString);
CPPUNIT_TEST(testIsalnumAsciiString);
+ CPPUNIT_TEST(testIsupperAsciiString);
CPPUNIT_TEST_SUITE_END();
};
@@ -129,6 +131,18 @@ void TestString::testIsalnumAsciiString()
CPPUNIT_ASSERT_EQUAL(comphelper::string::isalnumAsciiString(s4), false);
}
+void TestString::testIsupperAsciiString()
+{
+ rtl::OString s1(RTL_CONSTASCII_STRINGPARAM("1234"));
+ CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s1), false);
+
+ rtl::OString s2(RTL_CONSTASCII_STRINGPARAM("aAbB"));
+ CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s2), false);
+
+ rtl::OString s3(RTL_CONSTASCII_STRINGPARAM("AABB"));
+ CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s3), true);
+}
+
using namespace ::com::sun::star;
class testCollator : public cppu::WeakImplHelper1< i18n::XCollator >