diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-28 23:08:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 09:56:08 +0100 |
commit | 313332e76bd17c0a5a6bd67c0abc467877948a3a (patch) | |
tree | 217b63800be13ef2ebbae21c0f919467d782a287 /comphelper/qa/string | |
parent | 3422a02b5e9bd3a50518198c6ae9a9df0008edac (diff) |
various centralized isFOOAsciiStrings
Diffstat (limited to 'comphelper/qa/string')
-rw-r--r-- | comphelper/qa/string/test_string.cxx | 14 |
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 > |