diff options
| author | vvvv <[email protected]> | 2023-07-31 20:07:26 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2023-07-31 20:07:26 +0300 |
| commit | f9e4743508b7930e884714cc99985ac45f84ed98 (patch) | |
| tree | a1290261a4915a6f607e110e2cc27aee4c205f85 /library/cpp/geo/ut/util_ut.cpp | |
| parent | 5cf9beeab3ea847da0b6c414fcb5faa9cb041317 (diff) | |
Use UDFs from YDB
Diffstat (limited to 'library/cpp/geo/ut/util_ut.cpp')
| -rw-r--r-- | library/cpp/geo/ut/util_ut.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/library/cpp/geo/ut/util_ut.cpp b/library/cpp/geo/ut/util_ut.cpp deleted file mode 100644 index ebd86cfbd82..00000000000 --- a/library/cpp/geo/ut/util_ut.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include <library/cpp/geo/util.h> - -#include <library/cpp/testing/unittest/registar.h> - -using namespace NGeo; - -Y_UNIT_TEST_SUITE(TGeoUtilTest) { - Y_UNIT_TEST(TestPointFromString) { - UNIT_ASSERT_EQUAL(PairFromString("27.56,53.90"), (std::pair<double, double>(27.56, 53.90))); - UNIT_ASSERT_EQUAL(PairFromString("27.56 53.90", " "), (std::pair<double, double>(27.56, 53.90))); - UNIT_ASSERT_EQUAL(PairFromString("27.56@@53.90", "@@"), (std::pair<double, double>(27.56, 53.90))); - UNIT_ASSERT_EXCEPTION(PairFromString("27.56@@53.90", "@"), TBadCastException); - UNIT_ASSERT_EXCEPTION(PairFromString(""), TBadCastException); - } - - Y_UNIT_TEST(TestTryPointFromString) { - std::pair<double, double> point; - - UNIT_ASSERT(TryPairFromString(point, "27.56,53.90")); - UNIT_ASSERT_EQUAL(point, (std::pair<double, double>(27.56, 53.90))); - - UNIT_ASSERT(TryPairFromString(point, "27.56 53.90", " ")); - UNIT_ASSERT_EQUAL(point, (std::pair<double, double>(27.56, 53.90))); - - UNIT_ASSERT(TryPairFromString(point, "27.56@@53.90", "@@")); - UNIT_ASSERT_EQUAL(point, (std::pair<double, double>(27.56, 53.90))); - - UNIT_ASSERT(!TryPairFromString(point, "27.56@@53.90", "@")); - UNIT_ASSERT(!TryPairFromString(point, "")); - } - - Y_UNIT_TEST(TestVisibleMapBound) { - const double expectedLat = MercatorToLL(TMercatorPoint(0., LLToMercator(TGeoPoint(180., 0.)).X())).Lat(); - UNIT_ASSERT_DOUBLES_EQUAL(VISIBLE_LATITUDE_BOUND, expectedLat, 1.e-14); - } -} |
