1
Fork 0

Improved cxxmph test organization.

This commit is contained in:
Davi de Castro Reis 2011-05-15 19:48:01 -03:00
parent 7d5a62cb1a
commit 0761f24182
3 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -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()),

View File

@ -11,10 +11,10 @@ using cxxmph::cmph_hash_map;
int main(int argc, char** argv) {
cmph_hash_map<int64_t, int64_t> 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);
}
/*