Remove dependency on boost/typeindex in tests.

This commit is contained in:
Nick Thompson
2018-10-26 19:23:11 -06:00
parent 0c6ec8088d
commit de0d24733b
3 changed files with 1 additions and 5 deletions

View File

@ -68,7 +68,7 @@ euclidean_result_t<Z> extended_euclidean(Z m, Z n)
if (swapped)
{
return {u0, u2, u2};
return {u0, u2, u1};
}
return {u0, u1, u2};
}

View File

@ -5,7 +5,6 @@
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <cassert>
#include <boost/type_index.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/integer/common_factor.hpp>
#include <boost/integer/extended_euclidean.hpp>
@ -18,7 +17,6 @@ using boost::integer::gcd;
template<class Z>
void test_extended_euclidean()
{
std::cout << "Testing the extended Euclidean algorithm on type " << boost::typeindex::type_id<Z>().pretty_name() << "\n";
// Stress test:
//Z max_arg = std::numeric_limits<Z>::max();
Z max_arg = 500;

View File

@ -5,7 +5,6 @@
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <cassert>
#include <boost/type_index.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/integer/common_factor.hpp>
#include <boost/integer/mod_inverse.hpp>
@ -18,7 +17,6 @@ using boost::integer::gcd;
template<class Z>
void test_mod_inverse()
{
std::cout << "Testing the modular multiplicative inverse on type " << boost::typeindex::type_id<Z>().pretty_name() << "\n";
//Z max_arg = std::numeric_limits<Z>::max();
Z max_arg = 500;
for (Z modulus = 2; modulus < max_arg; ++modulus)