mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 05:24:02 +00:00
Updated tests to latest fixes, within/large integers, correct now with int, removed wkt/iomanip by default
[SVN r76857]
This commit is contained in:
parent
f20bfd7b83
commit
4eae3b5b37
@ -170,7 +170,7 @@ int test_main(int, char* [])
|
||||
//test_all<float[2]>(); not yet because cannot be copied, for polygon
|
||||
//test_all<double[2]>();
|
||||
|
||||
//test_all<point_xy<int> >();
|
||||
test_all<bg::model::d2::point_xy<int> >();
|
||||
test_all<bg::model::d2::point_xy<float> >();
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
|
||||
|
@ -218,8 +218,32 @@ void test_strategy()
|
||||
}
|
||||
|
||||
|
||||
void test_large_integers()
|
||||
{
|
||||
typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
|
||||
typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
|
||||
|
||||
std::string const polygon_li = "POLYGON((1872000 528000,1872000 192000,1536119 192000,1536000 528000,1200000 528000,1200000 863880,1536000 863880,1872000 863880,1872000 528000))";
|
||||
bg::model::polygon<int_point_type> int_poly;
|
||||
bg::model::polygon<double_point_type> double_poly;
|
||||
bg::read_wkt(polygon_li, int_poly);
|
||||
bg::read_wkt(polygon_li, double_poly);
|
||||
|
||||
std::string const point_li = "POINT(1592000 583950)";
|
||||
int_point_type int_point;
|
||||
double_point_type double_point;
|
||||
bg::read_wkt(point_li, int_point);
|
||||
bg::read_wkt(point_li, double_point);
|
||||
|
||||
bool wi = bg::within(int_point, int_poly);
|
||||
bool wd = bg::within(double_point, double_poly);
|
||||
|
||||
}
|
||||
|
||||
int test_main( int , char* [] )
|
||||
{
|
||||
test_large_integers();
|
||||
|
||||
test_all<bg::model::d2::point_xy<int> >();
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
|
||||
|
@ -175,7 +175,7 @@ int test_main(int, char* [])
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
|
||||
#ifdef HAVE_TTMATH
|
||||
//test_all<bg::model::d2::point_xy<ttmath_big> >();
|
||||
test_all<bg::model::d2::point_xy<ttmath_big> >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -134,7 +134,7 @@ int test_main(int, char* [])
|
||||
test_all<bg::model::d2::point_xy<double> >();
|
||||
|
||||
#ifdef HAVE_TTMATH
|
||||
//test_all<bg::model::d2::point_xy<ttmath_big> >();
|
||||
test_all<bg::model::d2::point_xy<ttmath_big> >();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user