From 5b487bd6d66f9a8f43260a9bec978ea8cf692995 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 11 May 2016 16:38:14 +0800 Subject: fixes compile --- tests/storage/Makefile.am | 9 ++++++--- tests/storage/test_matrix.cpp | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'tests/storage') 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 #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)); -- cgit