mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "testing/testing.hpp"
|
||||
|
||||
#include "routing/maxspeeds_serialization.hpp"
|
||||
#include "routing/maxspeeds.hpp"
|
||||
#include "routing/maxspeeds_serialization.hpp"
|
||||
|
||||
#include "routing_common/maxspeed_conversion.hpp"
|
||||
|
||||
@@ -32,9 +32,8 @@ void TestMaxspeedsSerialization(vector<FeatureMaxspeed> const & speeds)
|
||||
MaxspeedConverter const & converter = GetMaxspeedConverter();
|
||||
for (auto const & s : speeds)
|
||||
{
|
||||
inputSpeeds.push_back({ s.GetFeatureId(),
|
||||
converter.SpeedToMacro(s.GetForwardSpeedInUnits()),
|
||||
converter.SpeedToMacro(s.GetBackwardSpeedInUnits()) });
|
||||
inputSpeeds.push_back({s.GetFeatureId(), converter.SpeedToMacro(s.GetForwardSpeedInUnits()),
|
||||
converter.SpeedToMacro(s.GetBackwardSpeedInUnits())});
|
||||
}
|
||||
|
||||
int constexpr SPEEDS_COUNT = MaxspeedsSerializer::DEFAULT_SPEEDS_COUNT;
|
||||
@@ -136,38 +135,32 @@ UNIT_TEST(MaxspeedsSerializer_Smoke)
|
||||
|
||||
UNIT_TEST(MaxspeedsSerializer_OneForwardMetric)
|
||||
{
|
||||
TestMaxspeedsSerialization(
|
||||
{FeatureMaxspeed(0 /* feature id */, Units::Metric, 20 /* speed */)});
|
||||
TestMaxspeedsSerialization({FeatureMaxspeed(0 /* feature id */, Units::Metric, 20 /* speed */)});
|
||||
}
|
||||
|
||||
UNIT_TEST(MaxspeedsSerializer_OneNone)
|
||||
{
|
||||
TestMaxspeedsSerialization(
|
||||
{FeatureMaxspeed(0 /* feature id */, Units::Metric, kNoneMaxSpeed)});
|
||||
TestMaxspeedsSerialization({FeatureMaxspeed(0 /* feature id */, Units::Metric, kNoneMaxSpeed)});
|
||||
}
|
||||
|
||||
UNIT_TEST(MaxspeedsSerializer_OneWalk)
|
||||
{
|
||||
TestMaxspeedsSerialization(
|
||||
{FeatureMaxspeed(0 /* feature id */, Units::Metric, kWalkMaxSpeed)});
|
||||
TestMaxspeedsSerialization({FeatureMaxspeed(0 /* feature id */, Units::Metric, kWalkMaxSpeed)});
|
||||
}
|
||||
|
||||
UNIT_TEST(MaxspeedsSerializer_OneBidirectionalMetric_1)
|
||||
{
|
||||
TestMaxspeedsSerialization(
|
||||
{FeatureMaxspeed(0 /* feature id */, Units::Metric, 20 /* speed */, 40 /* speed */)});
|
||||
TestMaxspeedsSerialization({FeatureMaxspeed(0 /* feature id */, Units::Metric, 20 /* speed */, 40 /* speed */)});
|
||||
}
|
||||
|
||||
UNIT_TEST(MaxspeedsSerializer_OneBidirectionalMetric_2)
|
||||
{
|
||||
TestMaxspeedsSerialization(
|
||||
{FeatureMaxspeed(0 /* feature id */, Units::Metric, 10 /* speed */, kWalkMaxSpeed)});
|
||||
TestMaxspeedsSerialization({FeatureMaxspeed(0 /* feature id */, Units::Metric, 10 /* speed */, kWalkMaxSpeed)});
|
||||
}
|
||||
|
||||
UNIT_TEST(MaxspeedsSerializer_OneBidirectionalImperial)
|
||||
{
|
||||
TestMaxspeedsSerialization(
|
||||
{FeatureMaxspeed(0 /* feature id */, Units::Imperial, 30 /* speed */, 50 /* speed */)});
|
||||
TestMaxspeedsSerialization({FeatureMaxspeed(0 /* feature id */, Units::Imperial, 30 /* speed */, 50 /* speed */)});
|
||||
}
|
||||
|
||||
UNIT_TEST(MaxspeedsSerializer_BigMetric)
|
||||
|
||||
Reference in New Issue
Block a user