diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-02-18 22:50:16 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-02-18 22:50:16 +0100 |
| commit | 2b1cf12bf36e536cd29994951b46f180e81e1179 (patch) | |
| tree | 9e49a7b998f27b5a11bff304461baa836212420a /test/unit/gie_self_tests.cpp | |
| parent | 97016c7f7b74bd473c446ee128d1774209eddfc0 (diff) | |
| download | PROJ-2b1cf12bf36e536cd29994951b46f180e81e1179.tar.gz PROJ-2b1cf12bf36e536cd29994951b46f180e81e1179.zip | |
Fix a few issues with i386 builds
Relax tolerances in a few unit test, and in laea code.
Seen with gcc 5.3 and also 7.1
Related to the use of the 387 floating-point math, since they
disappear with gcc 7.1 if using non-default -mfpmath=sse -msse
Diffstat (limited to 'test/unit/gie_self_tests.cpp')
| -rw-r--r-- | test/unit/gie_self_tests.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/unit/gie_self_tests.cpp b/test/unit/gie_self_tests.cpp index 5936791e..ad637786 100644 --- a/test/unit/gie_self_tests.cpp +++ b/test/unit/gie_self_tests.cpp @@ -256,8 +256,8 @@ TEST_F(gieTest, proj_create_crs_to_crs) { b.xy.y = 5999669.3036037628; a = proj_trans(P, PJ_FWD, a); - EXPECT_NEAR(a.xy.x, b.xy.x, 1e-9); - EXPECT_NEAR(a.xy.y, b.xy.y, 1e-9); + EXPECT_NEAR(a.xy.x, b.xy.x, 1e-8); + EXPECT_NEAR(a.xy.y, b.xy.y, 1e-8); auto src = proj_get_source_crs(PJ_DEFAULT_CTX, P); ASSERT_TRUE(src != nullptr); @@ -419,11 +419,12 @@ TEST(gie, info_functions) { ASSERT_FALSE(proj_errno(P)); /* factors not created correctly */ /* check a few key characteristics of the Mercator projection */ - ASSERT_EQ(factors.angular_distortion, - 0.0); /* angular distortion should be 0 */ - ASSERT_EQ(factors.meridian_parallel_angle, - M_PI_2); /* Meridian/parallel angle should be 90 deg */ - ASSERT_EQ(factors.meridian_convergence, + EXPECT_NEAR(factors.angular_distortion, 0.0, 1e-7) + << factors.angular_distortion; /* angular distortion should be 0 */ + EXPECT_NEAR(factors.meridian_parallel_angle, M_PI_2, 1e-7) + << factors.meridian_parallel_angle; /* Meridian/parallel angle should be + 90 deg */ + EXPECT_EQ(factors.meridian_convergence, 0.0); /* meridian convergence should be 0 */ proj_destroy(P); |
