summaryrefslogtreecommitdiff
path: root/android/PhoneticStringUtilsTest.cpp
diff options
context:
space:
mode:
authorDaisuke Miyakawa <dmiyakawa@google.com>2009-07-09 12:49:10 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-07-09 12:49:10 -0700
commitfa6825c21fed45dab7661bc2eee8c8e2fbca09c9 (patch)
tree7c9df7877fce2e611526f3d968813c848cce43ad /android/PhoneticStringUtilsTest.cpp
parent8f0bc38eea9fbe489d2eb39cd3a692a45cdd2c5c (diff)
parent1ec1f3dec4ec6e1e5ed45b4d859a9f433e085354 (diff)
am 1ec1f3de: quick fix
Merge commit '1ec1f3dec4ec6e1e5ed45b4d859a9f433e085354' * commit '1ec1f3dec4ec6e1e5ed45b4d859a9f433e085354': quick fix
Diffstat (limited to 'android/PhoneticStringUtilsTest.cpp')
-rw-r--r--android/PhoneticStringUtilsTest.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/android/PhoneticStringUtilsTest.cpp b/android/PhoneticStringUtilsTest.cpp
index 06a7ba8..5665fb9 100644
--- a/android/PhoneticStringUtilsTest.cpp
+++ b/android/PhoneticStringUtilsTest.cpp
@@ -31,7 +31,7 @@ class TestExecutor {
private:
void DoOneTest(void (TestExecutor::*test)());
- void testGetUtf32At();
+ void testUtf32At();
void testGetPhoneticallySortableCodePointAscii();
void testGetPhoneticallySortableCodePointKana();
void testGetPhoneticallySortableCodePointWhitespaceOnly();
@@ -67,7 +67,7 @@ class TestExecutor {
bool TestExecutor::DoAllTests() {
- DoOneTest(&TestExecutor::testGetUtf32At);
+ DoOneTest(&TestExecutor::testUtf32At);
DoOneTest(&TestExecutor::testGetPhoneticallySortableCodePointAscii);
DoOneTest(&TestExecutor::testGetPhoneticallySortableCodePointKana);
DoOneTest(&TestExecutor::testGetPhoneticallySortableCodePointWhitespaceOnly);
@@ -97,8 +97,7 @@ void TestExecutor::DoOneTest(void (TestExecutor::*test)()) {
#define TEST_GET_UTF32AT(src, index, expected_next, expected_value) \
({ \
size_t next; \
- String8 string8(src); \
- int32_t ret = string8.getUtf32At((index), &next); \
+ int32_t ret = utf32_at(src, strlen(src), index, &next); \
if (ret < 0) { \
printf("getUtf32At() returned negative value (src: %s, index: %d)\n", \
(src), (index)); \
@@ -111,8 +110,8 @@ void TestExecutor::DoOneTest(void (TestExecutor::*test)()) {
} \
})
-void TestExecutor::testGetUtf32At() {
- printf("testGetUtf32At()\n");
+void TestExecutor::testUtf32At() {
+ printf("testUtf32At()\n");
TEST_GET_UTF32AT("a", 0, 1, 97);
// Japanese hiragana "a"