#ifndef __BSL_TEST_HASHTABLE_H #define __BSL_TEST_HASHTABLE_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include char s[][32]={"yingxiang", "yufan", "wangjiping", "xiaowei", "yujianjia", "maran", "baonenghui", "gonglei", "wangyue", "changxinglong", "chenxiaoming", "guoxingrong", "kuangyuheng" }; const size_t N = sizeof(s) / sizeof(s[0]); std::string randstr() { char buf[130] = {0}; int len = rand()%64 + 1; for (int i=0; i hash_type; void test_rwhashset() { { hash_type ht; TS_ASSERT( 0 == ht.create(100)); } { try { printf("hello\n"); hash_type ht(0); } catch (bsl::Exception& e) { printf("\n==\n%s\n==\n",e.all()); printf("world\n"); } } { hash_type ht(100); std::set st; ht.assign(st.begin(),st.end()); } } void test_create() { hash_type ht; for (int i = 10; i < 100; i ++) { ht.create(i); } hash_type ht2; for (int i = 0; i < 100; i ++) { ht2.create(i); } } }; #endif /* vim: set ts=4 sw=4 sts=4 tw=100 noet: */