From 0761f2418247c875832e31b6d1cfd484ef6bd059 Mon Sep 17 00:00:00 2001 From: Davi de Castro Reis Date: Sun, 15 May 2011 19:48:01 -0300 Subject: [PATCH] Improved cxxmph test organization. --- cxxmph/Makefile.am | 1 + cxxmph/cmph_hash_map.h | 4 ---- cxxmph/cmph_hash_map_test.cc | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cxxmph/Makefile.am b/cxxmph/Makefile.am index a7fafa0..087e487 100644 --- a/cxxmph/Makefile.am +++ b/cxxmph/Makefile.am @@ -1,3 +1,4 @@ +TESTS = $(check_PROGRAMS) check_PROGRAMS = cmph_hash_map_test mphtable_test trigraph_test noinst_PROGRAMS = bm_numbers bm_urls bin_PROGRAMS = cxxmph diff --git a/cxxmph/cmph_hash_map.h b/cxxmph/cmph_hash_map.h index 629667f..3f1b1b5 100644 --- a/cxxmph/cmph_hash_map.h +++ b/cxxmph/cmph_hash_map.h @@ -103,10 +103,6 @@ CMPH_METHOD_DECL(insert_return_type, insert)(const value_type& x) { CMPH_METHOD_DECL(void_type, rehash)() { if (values_.empty()) return; - std::cerr << "Calling Reset with " - << table_.size() << " keys in table " - << slack_.size() << " keys in slack " - << values_.size() << " key in total" << std::endl; slack_type().swap(slack_); bool success = table_.Reset( make_iterator_first(values_.begin()), diff --git a/cxxmph/cmph_hash_map_test.cc b/cxxmph/cmph_hash_map_test.cc index 2ebaa94..50a7bc5 100644 --- a/cxxmph/cmph_hash_map_test.cc +++ b/cxxmph/cmph_hash_map_test.cc @@ -11,10 +11,10 @@ using cxxmph::cmph_hash_map; int main(int argc, char** argv) { cmph_hash_map b; - for (int i = 0; i < 2*1000*1000; ++i) { + for (int i = 0; i < 100*1000; ++i) { b.insert(make_pair(i, i)); } - for (int i = 0; i < 100*1000*1000; ++i) { + for (int i = 0; i < 1000*1000; ++i) { b.find(i); } /*