diff options
author | lloyd <[email protected]> | 2014-05-17 00:36:03 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-05-17 00:36:03 +0000 |
commit | b9cd85a383b5a522a25d4d798e66d2921e2e1398 (patch) | |
tree | ec08ddeaad221b470bdcf3b5775ef6a14208c8b9 /src | |
parent | c7f871820646481207532e051fb464ede3f028ba (diff) |
Remove unused test. Bugzilla 272
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_bigint.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp index 2404dad5a..126fff411 100644 --- a/src/tests/test_bigint.cpp +++ b/src/tests/test_bigint.cpp @@ -60,69 +60,6 @@ std::vector<std::string> parse(const std::string& line) return substr; } -size_t test_make_prime() - { - AutoSeeded_RNG rng; - - std::set<BigInt> primes; - - std::map<int, int> bit_count; - - int not_new = 0; - - while(primes.size() < 10000) - { - u32bit start_cnt = primes.size(); - - u32bit bits = 18; - - if(rng.next_byte() % 128 == 0) - bits -= rng.next_byte() % (bits-2); - - bit_count[bits]++; - - //std::cout << "random_prime(" << bits << ")\n"; - - BigInt p = random_prime(rng, bits); - - if(p.bits() != bits) - { - std::cout << "Asked for " << bits << " got " << p - << " " << p.bits() << " bits\n"; - return 1; - } - - primes.insert(random_prime(rng, bits)); - - if(primes.size() != start_cnt) - std::cout << primes.size() << "\n"; - else - not_new++; - - //std::cout << "miss: " << not_new << "\n"; - - if(not_new % 100000 == 0) - { - for(std::map<int, int>::iterator i = bit_count.begin(); - i != bit_count.end(); ++i) - std::cout << "bit_count[" << i->first << "] = " - << i->second << "\n"; - std::copy(primes.begin(), primes.end(), - std::ostream_iterator<BigInt>(std::cout, " ")); - } - } - - std::cout << "Generated all? primes\n"; - /* - for(u32bit j = 0; j != PRIME_TABLE_SIZE; ++j) - { - if(primes.count(PRIMES[j]) != 1) - std::cout << "Missing " << PRIMES[j] << "\n"; - } - */ - return 0; - } - // c==expected, d==a op b, e==a op= b size_t results(std::string op, const BigInt& a, const BigInt& b, @@ -442,8 +379,6 @@ size_t test_bigint() << std::dec << alg_count << std::endl; } - //total_errors += test_make_prime(); - return total_errors; } |