mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
[test] Write test configuration and make ccw order in tests optional
This commit is contained in:
parent
fbf333c8a7
commit
2989992d37
@ -57,9 +57,14 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_all<bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
test_all<bg::model::point<int, 2, bg::cs::cartesian> >();
|
||||
test_all<bg::model::point<float, 2, bg::cs::cartesian> >();
|
||||
test_all<bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TTMATH
|
||||
test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
|
||||
|
@ -235,8 +235,13 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
test_all<false, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -397,11 +397,18 @@ void test_invalid()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
test_all<false, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
//test_all<bg::model::point<tt, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_invalid<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
// test_invalid<true, bg::model::point<long double, 2, bg::cs::cartesian> >();
|
||||
test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
|
||||
test_invalid<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
test_invalid<true, bg::model::point<long double, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -474,6 +474,9 @@ void test_aimes()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_aimes<bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_aimes<bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -214,8 +214,13 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
test_all<false, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -206,8 +206,13 @@ void test_many_points_per_circle()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
test_all<false, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_GEOMETRY_COMPILER_MODE_RELEASE) && ! defined(BOOST_GEOMETRY_COMPILER_MODE_DEBUG)
|
||||
test_many_points_per_circle<bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
|
@ -513,11 +513,13 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_all<false, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
//test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -30,7 +30,12 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
test_all<false, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -35,8 +35,13 @@ void test_point()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_point<true, bg::model::point<double, 2, bg::cs::geographic<bg::degree> > >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_point<true, bg::model::point<default_test_type, 2, bg::cs::geographic<bg::degree> > >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
test_point<true, bg::model::point<long double, 2, bg::cs::geographic<bg::degree> > >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -828,20 +828,22 @@ void test_mixed()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
typedef bg::model::point<double, 2, bg::cs::cartesian> dpoint;
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
typedef bg::model::point<default_test_type, 2, bg::cs::cartesian> dpoint;
|
||||
|
||||
test_all<true, dpoint>();
|
||||
test_deflate_special_cases<true, dpoint>();
|
||||
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_all<false, dpoint>();
|
||||
#endif
|
||||
|
||||
typedef bg::model::point<float, 2, bg::cs::cartesian> fpoint;
|
||||
test_deflate_special_cases<true, fpoint>();
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_deflate_special_cases<true, dpoint>();
|
||||
test_deflate_special_cases<false, dpoint>();
|
||||
#endif
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
typedef bg::model::point<float, 2, bg::cs::cartesian> fpoint;
|
||||
test_deflate_special_cases<true, fpoint>();
|
||||
|
||||
test_mixed<dpoint, dpoint, false, false, true, true>();
|
||||
test_mixed<dpoint, dpoint, false, true, true, true>();
|
||||
|
@ -34,9 +34,15 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
test_all<false, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
test_all<false, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
test_all<true, bg::model::point<float, 2, bg::cs::cartesian> >();
|
||||
test_all<false, bg::model::point<float, 2, bg::cs::cartesian> >();
|
||||
#endif
|
||||
|
@ -133,6 +133,9 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
|
||||
test_all<true, bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -645,7 +645,8 @@ void test_specific()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
test_all<bg::model::d2::point_xy<default_test_type> >();
|
||||
|
||||
test_specific<bg::model::d2::point_xy<int>, false, false>();
|
||||
|
||||
|
@ -492,7 +492,8 @@ void test_specific()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
test_all<bg::model::d2::point_xy<default_test_type> >();
|
||||
|
||||
test_specific<bg::model::d2::point_xy<int>, false, false>();
|
||||
|
||||
|
@ -929,7 +929,8 @@ void test_ticket_10868(std::string const& wkt_out)
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
test_all<bg::model::d2::point_xy<default_test_type> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
test_all<bg::model::d2::point_xy<float> >();
|
||||
|
@ -493,7 +493,8 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
test_all<bg::model::d2::point_xy<default_test_type> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
test_all<bg::model::d2::point_xy<float> >();
|
||||
|
@ -626,7 +626,8 @@ void test_all()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
test_all<bg::model::d2::point_xy<default_test_type> >();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
|
||||
|
@ -473,7 +473,9 @@ void test_specific()
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<bg::model::d2::point_xy<double>, true, true>();
|
||||
BoostGeometryWriteTestConfiguration();
|
||||
test_all<bg::model::d2::point_xy<default_test_type>, true, true>();
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
test_all<bg::model::d2::point_xy<double>, false, false>();
|
||||
|
||||
|
@ -161,6 +161,8 @@ struct mathematical_policy
|
||||
|
||||
};
|
||||
|
||||
typedef double default_test_type;
|
||||
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
#define BG_IF_RESCALED(a, b) a
|
||||
#else
|
||||
@ -173,4 +175,28 @@ struct mathematical_policy
|
||||
#define BG_IF_KRAMER(a, b) b
|
||||
#endif
|
||||
|
||||
inline void BoostGeometryWriteTestConfiguration()
|
||||
{
|
||||
std::cout << std::endl << "Test configuration:" << std::endl;
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
std::cout << " - Using rescaling" << std::endl;
|
||||
#endif
|
||||
#if defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
|
||||
std::cout << " - Using Kramer rule" << std::endl;
|
||||
#else
|
||||
std::cout << " - Using general form" << std::endl;
|
||||
#endif
|
||||
#if defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
std::cout << " - Testing only one type" << std::endl;
|
||||
#endif
|
||||
#if defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
|
||||
std::cout << " - Testing only one order" << std::endl;
|
||||
#endif
|
||||
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
|
||||
std::cout << " - Including failing test cases" << std::endl;
|
||||
#endif
|
||||
std::cout << " - Default test type: " << string_from_type<default_test_type>::name() << std::endl;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
#endif // GEOMETRY_TEST_GEOMETRY_TEST_COMMON_HPP
|
||||
|
Loading…
x
Reference in New Issue
Block a user