summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/storage/test_phrase_index.cpp4
-rw-r--r--utils/storage/gen_binary_files.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/storage/test_phrase_index.cpp b/tests/storage/test_phrase_index.cpp
index 0ebcc36..72b6d03 100644
--- a/tests/storage/test_phrase_index.cpp
+++ b/tests/storage/test_phrase_index.cpp
@@ -110,6 +110,8 @@ int main(int argc, char * argv[]){
phrase_index_load.load_text(2, infile);
fclose(infile);
+ phrase_index.compat();
+
MemoryChunk* store1 = new MemoryChunk;
phrase_index_load.store(1, store1);
phrase_index_load.load(1, store1);
@@ -118,6 +120,8 @@ int main(int argc, char * argv[]){
phrase_index_load.store(2, store2);
phrase_index_load.load(2, store2);
+ phrase_index.compat();
+
phrase_index_load.get_phrase_item(16870555, item2);
assert( item2.get_phrase_length() == 14);
assert( item2.get_n_pronunciation() == 1);
diff --git a/utils/storage/gen_binary_files.cpp b/utils/storage/gen_binary_files.cpp
index 5e7f619..0873283 100644
--- a/utils/storage/gen_binary_files.cpp
+++ b/utils/storage/gen_binary_files.cpp
@@ -89,6 +89,8 @@ int main(int argc, char * argv[]){
phrase_index.load_text(2, infile);
fclose(infile);
+ phrase_index.compat();
+
new_chunk = new MemoryChunk;
phrase_index.store(1, new_chunk);
new_chunk->save("../../data/gb_char.bin");