summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-12-03 12:47:51 +0800
committerPeng Wu <alexepico@gmail.com>2012-12-03 12:47:51 +0800
commit9cb03603a51252708a0f43992ce9d40e38e88a55 (patch)
tree7df2010daf794e6b24a6b2dca44f8834d681ff2b /tests
parent226554dc4ca7c8271152136a640fe8dd4410dcd3 (diff)
downloadlibpinyin-9cb03603a51252708a0f43992ce9d40e38e88a55.tar.gz
libpinyin-9cb03603a51252708a0f43992ce9d40e38e88a55.tar.xz
libpinyin-9cb03603a51252708a0f43992ce9d40e38e88a55.zip
add test cases for pinyin_mask_out
Diffstat (limited to 'tests')
-rw-r--r--tests/test_chewing.cpp4
-rw-r--r--tests/test_phrase.cpp4
-rw-r--r--tests/test_pinyin.cpp4
3 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_chewing.cpp b/tests/test_chewing.cpp
index 5f1b000..f74cf02 100644
--- a/tests/test_chewing.cpp
+++ b/tests/test_chewing.cpp
@@ -57,7 +57,11 @@ int main(int argc, char * argv[]){
}
pinyin_free_instance(instance);
+
+ pinyin_mask_out(context, 0x0, 0x0);
+ pinyin_save(context);
pinyin_fini(context);
+
free(linebuf);
return 0;
}
diff --git a/tests/test_phrase.cpp b/tests/test_phrase.cpp
index ef32d09..36603e7 100644
--- a/tests/test_phrase.cpp
+++ b/tests/test_phrase.cpp
@@ -62,7 +62,11 @@ int main(int argc, char * argv[]){
}
pinyin_free_instance(instance);
+
+ pinyin_mask_out(context, 0x0, 0x0);
+ pinyin_save(context);
pinyin_fini(context);
+
free(linebuf);
return 0;
}
diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp
index 6978d18..920963a 100644
--- a/tests/test_pinyin.cpp
+++ b/tests/test_pinyin.cpp
@@ -90,7 +90,11 @@ int main(int argc, char * argv[]){
pinyin_free_candidates(instance, candidates);
g_array_free(candidates, TRUE);
pinyin_free_instance(instance);
+
+ pinyin_mask_out(context, 0x0, 0x0);
+ pinyin_save(context);
pinyin_fini(context);
+
free(prefixbuf); free(linebuf);
return 0;
}