Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2015-02-27 20:31:21 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:46:03 +0300
commitc5a45d38c2060c1b8722a387031bef03cabdc9e6 (patch)
treecfbcac93439a272583e96657c5d17caaae8c97b5 /map/map_tests
parentb6db1697139223354c36524605eb13cbdc2f9f15 (diff)
Developing infrastucture for launching integration tests and unit tests for Android. Porting integration tests and indexer tests on Android platform.
Diffstat (limited to 'map/map_tests')
-rw-r--r--map/map_tests/map_tests.pro9
-rw-r--r--map/map_tests/measurement_tests.cpp81
2 files changed, 4 insertions, 86 deletions
diff --git a/map/map_tests/map_tests.pro b/map/map_tests/map_tests.pro
index d0a6974608..53e1d43c69 100644
--- a/map/map_tests/map_tests.pro
+++ b/map/map_tests/map_tests.pro
@@ -29,12 +29,11 @@ macx-*: LIBS *= "-framework Foundation" "-framework IOKit"
SOURCES += \
../../testing/testingmain.cpp \
- kmz_unarchive_test.cpp \
- navigator_test.cpp \
bookmarks_test.cpp \
- geourl_test.cpp \
- measurement_tests.cpp \
- mwm_url_tests.cpp \
feature_processor_test.cpp \
ge0_parser_tests.cpp \
+ geourl_test.cpp \
+ kmz_unarchive_test.cpp \
+ mwm_url_tests.cpp \
+ navigator_test.cpp \
tracks_tests.cpp \
diff --git a/map/map_tests/measurement_tests.cpp b/map/map_tests/measurement_tests.cpp
deleted file mode 100644
index b4678fc7bb..0000000000
--- a/map/map_tests/measurement_tests.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-#include "testing/testing.hpp"
-
-#include "map/measurement_utils.hpp"
-
-#include "platform/settings.hpp"
-
-
-using namespace MeasurementUtils;
-
-UNIT_TEST(Measurement_Smoke)
-{
- Settings::Set("Units", Settings::Metric);
-
- typedef pair<double, char const *> PairT;
-
- PairT arr[] = {
- PairT(10.0, "10 m"),
- PairT(10.4, "10 m"),
- PairT(10.51, "11 m"),
- PairT(1000.0, "1.0 km"),
- PairT(1100.0, "1.1 km"),
- PairT(1140.0, "1.1 km"),
- PairT(1151.0, "1.2 km"),
- PairT(1500.0, "1.5 km"),
- PairT(1549.9, "1.5 km"),
- PairT(1551.0, "1.6 km"),
- PairT(10000.0, "10 km"),
- PairT(10400.0, "10 km"),
- PairT(10499.9, "10 km"),
- PairT(10501.0, "11 km")
- };
-
- for (size_t i = 0; i < ARRAY_SIZE(arr); ++i)
- {
- string s;
- TEST(FormatDistance(arr[i].first, s), (arr[i]));
- TEST_EQUAL(s, arr[i].second, (arr[i]));
- }
-}
-
-UNIT_TEST(LatLonToDMS_Origin)
-{
- TEST_EQUAL(FormatLatLonAsDMS(0, 0), "00°00′00″ 00°00′00″", ());
- TEST_EQUAL(FormatLatLonAsDMS(0, 0, 3), "00°00′00″ 00°00′00″", ());
-}
-
-UNIT_TEST(LatLonToDMS_Rounding)
-{
- // Here and after data is from Wiki: http://bit.ly/datafotformatingtest
- // Boston
- TEST_EQUAL(FormatLatLonAsDMS(42.358056, -71.063611, 0), "42°21′29″N 71°03′49″W", ());
- // Minsk
- TEST_EQUAL(FormatLatLonAsDMS(53.916667, 27.55, 0), "53°55′00″N 27°33′00″E", ());
- // Rio
- TEST_EQUAL(FormatLatLonAsDMS(-22.908333, -43.196389, 0), "22°54′30″S 43°11′47″W", ());
-}
-
-UNIT_TEST(LatLonToDMS_NoRounding)
-{
- // Paris
- TEST_EQUAL(FormatLatLonAsDMS(48.8567, 2.3508, 2), "48°51′24.12″N 02°21′02.88″E", ());
- // Vatican
- TEST_EQUAL(FormatLatLonAsDMS(41.904, 12.453, 2), "41°54′14.4″N 12°27′10.8″E", ());
-
- TEST_EQUAL(FormatLatLonAsDMS(21.981112, -159.371112, 2), "21°58′52″N 159°22′16″W", ());
-}
-
-UNIT_TEST(FormatAltitude)
-{
- Settings::Set("Units", Settings::Foot);
- TEST_EQUAL(FormatAltitude(10000), "32808ft", ());
- Settings::Set("Units", Settings::Metric);
- TEST_EQUAL(FormatAltitude(5), "5m", ());
-}
-
-UNIT_TEST(FormatSpeed)
-{
- Settings::Set("Units", Settings::Metric);
- TEST_EQUAL(FormatSpeed(10), "36km/h", ());
- TEST_EQUAL(FormatSpeed(1), "3.6km/h", ());
-}