summaryrefslogtreecommitdiff
path: root/android/PhoneticStringUtilsTest.cpp
diff options
context:
space:
mode:
authorDaisuke Miyakawa <dmiyakawa@google.com>2009-07-09 14:03:07 +0900
committerDaisuke Miyakawa <dmiyakawa@google.com>2009-07-09 14:03:07 +0900
commit1ec1f3dec4ec6e1e5ed45b4d859a9f433e085354 (patch)
tree368e5e461a600b104853fe8ff24655eb509e92d2 /android/PhoneticStringUtilsTest.cpp
parente919af569c13d7445daf20cb06867e186afba92a (diff)
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"