summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/storage/Makefile.am9
-rw-r--r--tests/storage/test_matrix.cpp3
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/storage/Makefile.am b/tests/storage/Makefile.am
index 7675d11..1f74e72 100644
--- a/tests/storage/Makefile.am
+++ b/tests/storage/Makefile.am
@@ -34,6 +34,7 @@ noinst_PROGRAMS = test_phrase_index \
test_ngram \
test_flexible_ngram \
test_parser2 \
+ test_matrix \
test_chewing_table \
test_table_info
@@ -44,11 +45,13 @@ test_phrase_index_logger_SOURCES = test_phrase_index_logger.cpp
test_phrase_table_SOURCES = test_phrase_table.cpp
-test_ngram_SOURCES = test_ngram.cpp
+test_ngram_SOURCES = test_ngram.cpp
-test_flexible_ngram_SOURCES = test_flexible_ngram.cpp
+test_flexible_ngram_SOURCES = test_flexible_ngram.cpp
-test_parser2_SOURCES = test_parser2.cpp
+test_parser2_SOURCES = test_parser2.cpp
+
+test_matrix_SOURCES = test_matrix.cpp
test_chewing_table_SOURCES = test_chewing_table.cpp
diff --git a/tests/storage/test_matrix.cpp b/tests/storage/test_matrix.cpp
index ba9b3e0..fd965b8 100644
--- a/tests/storage/test_matrix.cpp
+++ b/tests/storage/test_matrix.cpp
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include "pinyin_internal.h"
+size_t bench_times = 1000;
using namespace pinyin;
@@ -30,7 +31,7 @@ int main(int argc, char * argv[]) {
pinyin_option_t options = PINYIN_CORRECT_ALL;
options |= PINYIN_INCOMPLETE;
- PhoneticParser2 * parser = FullPinyinParser2();
+ PhoneticParser2 * parser = new FullPinyinParser2();
ChewingKeyVector keys = g_array_new(FALSE, FALSE, sizeof(ChewingKey));
ChewingKeyRestVector key_rests =
g_array_new(FALSE, FALSE, sizeof(ChewingKeyRest));