add test cases to bi-gram
authorPeng Wu <alexepico@gmail.com>
Wed, 20 Apr 2011 06:24:44 +0000 (14:24 +0800)
committerPeng Wu <alexepico@gmail.com>
Wed, 20 Apr 2011 06:25:09 +0000 (14:25 +0800)
tests/storage/test_ngram.cpp

index 7fc1b85..9577167 100644 (file)
@@ -74,4 +74,9 @@ int main(int argc, char * argv[]){
        phrase_token_t * token = &g_array_index(items, phrase_token_t, i);
        printf("item:%d\n", *token);
     }
+
+    assert(bigram.load_db("/tmp/test.db"));
+    assert(bigram.save_db("/tmp/test.db"));
+
+    return 0;
 }