aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-11 20:01:27 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-11 20:01:27 -0400
commitc87d3baea33ced4fe224b94ae5f1ab1a39ebc3e9 (patch)
tree9512e1e469651a410b6e9b866511e3aebf2500aa /tests
parent5900739aa96d39fef48d5be8ce277880f2949d68 (diff)
downloaddeduper-c87d3baea33ced4fe224b94ae5f1ab1a39ebc3e9.tar.xz
Stop writting result to a file as it's in the database already.
Diffstat (limited to 'tests')
-rw-r--r--tests/testdrive_sqlite.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/testdrive_sqlite.cpp b/tests/testdrive_sqlite.cpp
index 01a76ad..42f176e 100644
--- a/tests/testdrive_sqlite.cpp
+++ b/tests/testdrive_sqlite.cpp
@@ -263,7 +263,6 @@ int main(int argc,char** argv)
puts("computing signature vectors...");
run();
- FILE *outf = fopen("result", "wb");
std::vector<dupe_t> dupes = sdb->dupe_pairs();
for (auto &p : dupes)
@@ -273,18 +272,7 @@ int main(int argc,char** argv)
#else
printf("%s %s %f\n", files[p.id1].c_str(), files[p.id2].c_str(), p.distance);
#endif
- int t;
- double ts=0;
- t = (int)files[p.id1].native().length();
- fwrite(&t, sizeof(int), 1, outf);
- fwrite(files[p.id1].c_str(), sizeof(fs::path::value_type), t, outf);
- t = (int)files[p.id2].native().length();
- fwrite(&t, sizeof(int), 1, outf);
- fwrite(files[p.id2].c_str(), sizeof(fs::path::value_type), t, outf);
- ts = p.distance;
- fwrite(&ts, sizeof(double), 1, outf);
}
- fclose(outf);
sdb->to_db_file("test.sigdb");
delete sdb;
return 0;