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
path: root/coding
diff options
context:
space:
mode:
authorSergey Yershov <syershov@maps.me>2017-03-06 17:58:57 +0300
committerSergey Yershov <syershov@maps.me>2017-03-20 11:34:39 +0300
commit8fc9f272cb285a64a197da02429316430f787cb6 (patch)
tree089f1f22c660767ba9f9295b3d9fa8d36252ef74 /coding
parent6c57ac53cdb7bc9ac4ea350f4b0c1099b06ddb96 (diff)
Test for new serializer
Diffstat (limited to 'coding')
-rw-r--r--coding/coding_tests/traffic_test.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/coding/coding_tests/traffic_test.cpp b/coding/coding_tests/traffic_test.cpp
index 62b9638ab4..83d621ab86 100644
--- a/coding/coding_tests/traffic_test.cpp
+++ b/coding/coding_tests/traffic_test.cpp
@@ -59,7 +59,7 @@ void Test(vector<TrafficGPSEncoder::DataPoint> & points)
UNIT_TEST(Traffic_Serialization_Smoke)
{
vector<TrafficGPSEncoder::DataPoint> data = {
- {0, ms::LatLon(0.0, 1.0)}, {0, ms::LatLon(0.0, 2.0)},
+ {0, ms::LatLon(0.0, 1.0), 1}, {0, ms::LatLon(0.0, 2.0), 2},
};
Test(data);
}
@@ -73,7 +73,7 @@ UNIT_TEST(Traffic_Serialization_EmptyPath)
UNIT_TEST(Traffic_Serialization_StraightLine100m)
{
vector<TrafficGPSEncoder::DataPoint> path = {
- {0, ms::LatLon(0.0, 0.0)}, {0, ms::LatLon(0.0, 1e-3)},
+ {0, ms::LatLon(0.0, 0.0), 1}, {0, ms::LatLon(0.0, 1e-3), 2},
};
Test(path);
}
@@ -81,7 +81,7 @@ UNIT_TEST(Traffic_Serialization_StraightLine100m)
UNIT_TEST(Traffic_Serialization_StraightLine50Km)
{
vector<TrafficGPSEncoder::DataPoint> path = {
- {0, ms::LatLon(0.0, 0.0)}, {0, ms::LatLon(0.0, 0.5)},
+ {0, ms::LatLon(0.0, 0.0), 1}, {0, ms::LatLon(0.0, 0.5), 2},
};
Test(path);
}
@@ -93,7 +93,7 @@ UNIT_TEST(Traffic_Serialization_Zigzag500m)
{
double const x = i * 1e-3;
double const y = i % 2 == 0 ? 0 : 1e-3;
- path.emplace_back(TrafficGPSEncoder::DataPoint(0, ms::LatLon(y, x)));
+ path.emplace_back(TrafficGPSEncoder::DataPoint(0, ms::LatLon(y, x), 3));
}
Test(path);
}
@@ -105,7 +105,7 @@ UNIT_TEST(Traffic_Serialization_Zigzag10Km)
{
double const x = i * 1e-2;
double const y = i % 2 == 0 ? 0 : 1e-2;
- path.emplace_back(TrafficGPSEncoder::DataPoint(0, ms::LatLon(y, x)));
+ path.emplace_back(TrafficGPSEncoder::DataPoint(0, ms::LatLon(y, x), 0));
}
Test(path);
}
@@ -117,7 +117,7 @@ UNIT_TEST(Traffic_Serialization_Zigzag100Km)
{
double const x = i * 1e-1;
double const y = i % 2 == 0 ? 0 : 1e-1;
- path.emplace_back(TrafficGPSEncoder::DataPoint(0, ms::LatLon(y, x)));
+ path.emplace_back(TrafficGPSEncoder::DataPoint(0, ms::LatLon(y, x), 0));
}
Test(path);
}
@@ -132,7 +132,7 @@ UNIT_TEST(Traffic_Serialization_Circle20KmRadius)
double const radius = 0.25;
double const x = radius * cos(alpha);
double const y = radius * sin(alpha);
- path.emplace_back(TrafficGPSEncoder::DataPoint(0, ms::LatLon(y, x)));
+ path.emplace_back(TrafficGPSEncoder::DataPoint(0, ms::LatLon(y, x), 0));
}
Test(path);
}
@@ -140,7 +140,7 @@ UNIT_TEST(Traffic_Serialization_Circle20KmRadius)
UNIT_TEST(Traffic_Serialization_ExtremeLatLon)
{
vector<TrafficGPSEncoder::DataPoint> path = {
- {0, ms::LatLon(-90, -180)}, {0, ms::LatLon(90, 180)},
+ {0, ms::LatLon(-90, -180), 0}, {0, ms::LatLon(90, 180), 0},
};
Test(path);
}