diff options
author | Peng Wu <alexepico@gmail.com> | 2013-04-08 15:10:27 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-04-08 15:10:27 +0800 |
commit | d972cff706c35d4bde2627083cf255ffa018db0a (patch) | |
tree | 905f6d801003dfac2f8e49b1e9be796e861aa9bf /src | |
parent | 8ea45f079b7817f0421d4b8400cd957f68d42716 (diff) | |
download | libpinyin-d972cff706c35d4bde2627083cf255ffa018db0a.tar.gz libpinyin-d972cff706c35d4bde2627083cf255ffa018db0a.tar.xz libpinyin-d972cff706c35d4bde2627083cf255ffa018db0a.zip |
write test cases for table info
Diffstat (limited to 'src')
-rw-r--r-- | src/storage/table_info.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/storage/table_info.cpp b/src/storage/table_info.cpp index fd2d2f4..5cd0ca4 100644 --- a/src/storage/table_info.cpp +++ b/src/storage/table_info.cpp @@ -130,15 +130,15 @@ bool SystemTableInfo::load(const char * filename) { int binver = 0, modelver = 0; gfloat lambda = 0.; - int num = fscanf(input, "binary format version:%d", &binver); + int num = fscanf(input, "binary format version:%d\n", &binver); if (1 != num) return false; - num = fscanf(input, "model data version:%d", &modelver); + num = fscanf(input, "model data version:%d\n", &modelver); if (1 != num) return false; - num = fscanf(input, "lambda parameter:%f", &lambda); + num = fscanf(input, "lambda parameter:%f\n", &lambda); if (1 != num) return false; @@ -153,7 +153,7 @@ bool SystemTableInfo::load(const char * filename) { int index = 0; char tablefile[256], sysfile[256], userfile[256], filetype[256]; while (!feof(input)) { - num = fscanf(input, "%d %s %s %s %s", + num = fscanf(input, "%d %s %s %s %s\n", &index, tablefile, sysfile, userfile, filetype); if (5 != num) @@ -210,11 +210,11 @@ bool UserTableInfo::load(const char * filename) { int binver = 0, modelver = 0; - int num = fscanf(input, "binary format version:%d", &binver); + int num = fscanf(input, "binary format version:%d\n", &binver); if (1 != num) return false; - num = fscanf(input, "model data version:%d", &modelver); + num = fscanf(input, "model data version:%d\n", &modelver); if (1 != num) return false; |