From a9bc6e5fb000f618c9df6276f4ef79063ce4cdfc Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 26 Feb 2020 20:36:33 +0100 Subject: Make tests independent of proj-datumgrid Fixes #1984 - Copy BETA2007.gsb, MD, alaska, conus, ntf_r93.gsb, ntv1_can.dat grids from proj-datumgrid to data/tests. - Replace a couple uses of nzgd2kgrid0005.gsb in tests by ntf_r93.gsb - Add downsampled/subsetted versions of egm96_15.gtx as tests/egm96_15_downsampled.gtx and ntv2_0.gsb as tests/ntv2_0_downsampled.gsb This results in a few changes in expected results - Simpify travis/install.sh due to less configurations to test This results in a hopefully acceptable increase of the proj-X.Y.Z.tar.gz from 2.9 to 5.3 MB --- test/unit/test_c_api.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'test/unit/test_c_api.cpp') diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 12a48a65..0f1b906e 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -4144,10 +4144,7 @@ TEST_F(CApi, proj_create_crs_to_crs_with_only_ballpark_transformations) { coord = proj_trans(Pnormalized, PJ_FWD, coord); EXPECT_NEAR(coord.xyzt.x, 3.0, 1e-9); EXPECT_NEAR(coord.xyzt.y, 40.65085651660555, 1e-9); - if (coord.xyzt.z != 0) { - // z will depend if the egm96_15.gtx grid is there or not - EXPECT_NEAR(coord.xyzt.z, 47.04784081844435, 1e-3); - } + EXPECT_NEAR(coord.xyzt.z, 47.72600023608570, 1e-3); } // --------------------------------------------------------------------------- @@ -4156,10 +4153,6 @@ TEST_F( CApi, proj_create_crs_to_crs_from_custom_compound_crs_with_NAD83_2011_and_geoidgrid_ref_against_WGS84_to_WGS84_G1762) { - if (strcmp(proj_grid_info("egm96_15.gtx").format, "missing") == 0) { - return; // use GTEST_SKIP() if we upgrade gtest - } - PJ *P; PJ *inCrsH = proj_create_from_database(m_ctxt, "EPSG", "6340", @@ -4214,7 +4207,7 @@ TEST_F( EXPECT_NEAR(outcoord.xyzt.x, 35.09499307271, 1e-9); EXPECT_NEAR(outcoord.xyzt.y, -118.64014868921, 1e-9); - EXPECT_NEAR(outcoord.xyzt.z, 118.059, 1e-3); + EXPECT_NEAR(outcoord.xyzt.z, 117.655, 1e-3); } // --------------------------------------------------------------------------- @@ -4223,10 +4216,6 @@ TEST_F( CApi, proj_create_crs_to_crs_from_custom_compound_crs_with_NAD83_2011_and_geoidgrid_ref_against_NAD83_2011_to_WGS84_G1762) { - if (strcmp(proj_grid_info("egm96_15.gtx").format, "missing") == 0) { - return; // use GTEST_SKIP() if we upgrade gtest - } - PJ *P; // NAD83(2011) 2D @@ -4278,7 +4267,7 @@ TEST_F( EXPECT_NEAR(outcoord.xyzt.x, 35.000003665064803, 1e-9); EXPECT_NEAR(outcoord.xyzt.y, -118.00001414221214, 1e-9); - EXPECT_NEAR(outcoord.xyzt.z, -32.5823, 1e-3); + EXPECT_NEAR(outcoord.xyzt.z, -32.8110, 1e-3); } // --------------------------------------------------------------------------- -- cgit v1.2.3