summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-09-09 15:54:15 +0800
committerPeng Wu <alexepico@gmail.com>2011-09-09 15:54:15 +0800
commitfd9ca5841dee309700444831c54f2ec743f7c5de (patch)
tree3e99c00c94ba4a669f6dc2c5b17583e0b68afe27
parent3723941d4c85446ab6c63ed5eaa72efee57fae0a (diff)
downloadlibpinyin-fd9ca5841dee309700444831c54f2ec743f7c5de.zip
libpinyin-fd9ca5841dee309700444831c54f2ec743f7c5de.tar.gz
libpinyin-fd9ca5841dee309700444831c54f2ec743f7c5de.tar.xz
update test case
-rw-r--r--tests/test_chewing.cpp4
-rw-r--r--tests/test_phrase.cpp4
-rw-r--r--tests/test_pinyin.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_chewing.cpp b/tests/test_chewing.cpp
index 8d88bb2..95e867e 100644
--- a/tests/test_chewing.cpp
+++ b/tests/test_chewing.cpp
@@ -27,7 +27,7 @@ int main(int argc, char * argv[]){
pinyin_context_t * context =
pinyin_init("../data", "../data");
- pinyin_instance_t * instance = pinyin_get_instance(context);
+ pinyin_instance_t * instance = pinyin_alloc_instance(context);
char* linebuf = NULL;
size_t size = 0;
@@ -54,7 +54,7 @@ int main(int argc, char * argv[]){
pinyin_save(context);
}
- pinyin_release_instance(instance);
+ pinyin_free_instance(instance);
pinyin_fini(context);
free(linebuf);
return 0;
diff --git a/tests/test_phrase.cpp b/tests/test_phrase.cpp
index 31ed518..5a70b45 100644
--- a/tests/test_phrase.cpp
+++ b/tests/test_phrase.cpp
@@ -27,7 +27,7 @@ int main(int argc, char * argv[]){
pinyin_context_t * context =
pinyin_init("../data", "../data");
- pinyin_instance_t * instance = pinyin_get_instance(context);
+ pinyin_instance_t * instance = pinyin_alloc_instance(context);
char* linebuf = NULL;
size_t size = 0;
@@ -60,7 +60,7 @@ int main(int argc, char * argv[]){
pinyin_save(context);
}
- pinyin_release_instance(instance);
+ pinyin_free_instance(instance);
pinyin_fini(context);
free(linebuf);
return 0;
diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp
index 61671a4..b8d8152 100644
--- a/tests/test_pinyin.cpp
+++ b/tests/test_pinyin.cpp
@@ -27,7 +27,7 @@ int main(int argc, char * argv[]){
pinyin_context_t * context =
pinyin_init("../data", "../data");
- pinyin_instance_t * instance = pinyin_get_instance(context);
+ pinyin_instance_t * instance = pinyin_alloc_instance(context);
char* linebuf = NULL;
size_t size = 0;
@@ -40,7 +40,7 @@ int main(int argc, char * argv[]){
if ( strcmp ( linebuf, "quit" ) == 0)
break;
- pinyin_parse_more_fulls(instance, linebuf);
+ pinyin_parse_more_full_pinyins(instance, linebuf);
pinyin_guess_sentence(instance);
char * sentence = NULL;
@@ -53,7 +53,7 @@ int main(int argc, char * argv[]){
pinyin_save(context);
}
- pinyin_release_instance(instance);
+ pinyin_free_instance(instance);
pinyin_fini(context);
free(linebuf);
return 0;