diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-14 12:37:43 -0700 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-04-18 14:43:31 +0300 |
commit | ddecdeca9493ac1caaae2301eb822bdbf2f75ff9 (patch) | |
tree | 26cd99a5fac3f78f97b0b380c5523f9e022a4f72 /test | |
parent | 092da9c956de9d623c6f22d073ebb7dcb2f5a23f (diff) | |
download | qtlocation-mapboxgl-ddecdeca9493ac1caaae2301eb822bdbf2f75ff9.tar.gz |
[core] Move ProjectedMeters to projection.hpp
Diffstat (limited to 'test')
-rw-r--r-- | test/util/geo.test.cpp | 15 | ||||
-rw-r--r-- | test/util/projection.test.cpp | 16 |
2 files changed, 15 insertions, 16 deletions
diff --git a/test/util/geo.test.cpp b/test/util/geo.test.cpp index 3dfa8e1cca..d0d01b6f88 100644 --- a/test/util/geo.test.cpp +++ b/test/util/geo.test.cpp @@ -33,21 +33,6 @@ TEST(LatLng, InvalidLatLng) { } } -TEST(ProjectedMeters, InvalidProjectedMeters) { - try { - ProjectedMeters { NAN }; - ASSERT_TRUE(false) << "should throw"; - } catch (const std::domain_error& error) { - ASSERT_EQ(std::string(error.what()), "northing must not be NaN"); - } - try { - ProjectedMeters { 0, NAN }; - ASSERT_TRUE(false) << "should throw"; - } catch (const std::domain_error& error) { - ASSERT_EQ(std::string(error.what()), "easting must not be NaN"); - } -} - TEST(EdgeInsets, InvalidEdgeInsets) { try { EdgeInsets { NAN }; diff --git a/test/util/projection.test.cpp b/test/util/projection.test.cpp index 9f27fe3d14..a489320dde 100644 --- a/test/util/projection.test.cpp +++ b/test/util/projection.test.cpp @@ -1,7 +1,6 @@ #include <mbgl/test/util.hpp> #include <mbgl/util/constants.hpp> -#include <mbgl/util/geo.hpp> #include <mbgl/util/projection.hpp> #include <limits> @@ -61,3 +60,18 @@ TEST(Projection, ProjectedMeters) { EXPECT_EQ(latLng.latitude(), util::LATITUDE_MAX); EXPECT_EQ(latLng.longitude(), util::LONGITUDE_MAX); } + +TEST(Projection, InvalidProjectedMeters) { + try { + ProjectedMeters { NAN }; + ASSERT_TRUE(false) << "should throw"; + } catch (const std::domain_error& error) { + ASSERT_EQ(std::string(error.what()), "northing must not be NaN"); + } + try { + ProjectedMeters { 0, NAN }; + ASSERT_TRUE(false) << "should throw"; + } catch (const std::domain_error& error) { + ASSERT_EQ(std::string(error.what()), "easting must not be NaN"); + } +} |