From 4f3a5acac5c1810d845e850f5199d9292c7fe1b6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 24 May 2023 09:35:10 +0200 Subject: Remove unused comphelper::adjustIndexToStartOfSurrogate ...introduced in 28cc0bff10f5dcec0c7b698ae7ba275845b2cad1 "Break comphelper::adjustIndexToStartOfSurrogate out of o3tl::iterateCodePoints" in preparation for bd5c3582581f37513f45b518e348f443d5d57334 "a11y: Fix returning unpaired surrogates when retrieving characters", but which never picked it up Change-Id: I5a10a3053d2f51333e27b74a808a41df7c1912ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152183 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- comphelper/qa/string/test_string.cxx | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'comphelper/qa') diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index 974673ca2940..58f9c3f63c16 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -50,7 +50,6 @@ public: void testReverseCodePoints(); void testSplit(); void testRemoveAny(); - void testAdjustIndexToStartOfSurrogate(); CPPUNIT_TEST_SUITE(TestString); CPPUNIT_TEST(testStripStart); @@ -64,7 +63,6 @@ public: CPPUNIT_TEST(testReverseCodePoints); CPPUNIT_TEST(testSplit); CPPUNIT_TEST(testRemoveAny); - CPPUNIT_TEST(testAdjustIndexToStartOfSurrogate); CPPUNIT_TEST_SUITE_END(); }; @@ -239,24 +237,6 @@ void TestString::testRemoveAny() CPPUNIT_ASSERT_EQUAL(OUString(), removeAny(in, test7)); } -void TestString::testAdjustIndexToStartOfSurrogate() { - CPPUNIT_ASSERT_EQUAL( - sal_Int32(0), - comphelper::string::adjustIndexToStartOfSurrogate("", 0)); - CPPUNIT_ASSERT_EQUAL( - sal_Int32(0), - comphelper::string::adjustIndexToStartOfSurrogate(u"\U00010000", 0)); - CPPUNIT_ASSERT_EQUAL( - sal_Int32(0), - comphelper::string::adjustIndexToStartOfSurrogate(u"\U00010000", 1)); - CPPUNIT_ASSERT_EQUAL( - sal_Int32(2), - comphelper::string::adjustIndexToStartOfSurrogate(u"\U00010000", 2)); - CPPUNIT_ASSERT_EQUAL( - sal_Int32(1), - comphelper::string::adjustIndexToStartOfSurrogate(u"\xD800", 1)); -} - CPPUNIT_TEST_SUITE_REGISTRATION(TestString); } -- cgit