mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-03 03:13:48 +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:
@@ -147,8 +147,7 @@ UNIT_TEST(ArchiveName_Create)
|
||||
routing::RouterType const routerType = routing::RouterType::Pedestrian;
|
||||
uint32_t const version = 1;
|
||||
std::chrono::seconds const timestamp(1573635326);
|
||||
std::string const filename =
|
||||
tracking::archival_file::GetArchiveFilename(version, timestamp, routerType);
|
||||
std::string const filename = tracking::archival_file::GetArchiveFilename(version, timestamp, routerType);
|
||||
|
||||
CHECK_EQUAL(filename, "1_1573635326_1.track", ());
|
||||
}
|
||||
|
||||
@@ -102,8 +102,7 @@ void DecodeDataPacketVersionTest(Container const & points, Protocol::PacketType
|
||||
TEST_EQUAL(points.size(), result.size(), ());
|
||||
for (size_t i = 0; i < points.size(); ++i)
|
||||
{
|
||||
TEST_EQUAL(points[i].m_timestamp, result[i].m_timestamp,
|
||||
(points[i].m_timestamp, result[i].m_timestamp));
|
||||
TEST_EQUAL(points[i].m_timestamp, result[i].m_timestamp, (points[i].m_timestamp, result[i].m_timestamp));
|
||||
TEST(AlmostEqualAbsOrRel(points[i].m_latLon.m_lat, result[i].m_latLon.m_lat, kEps),
|
||||
(points[i].m_latLon.m_lat, result[i].m_latLon.m_lat));
|
||||
TEST(AlmostEqualAbsOrRel(points[i].m_latLon.m_lon, result[i].m_latLon.m_lon, kEps),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "testing/testing.hpp"
|
||||
|
||||
#include "tracking/reporter.hpp"
|
||||
#include "tracking/protocol.hpp"
|
||||
#include "tracking/reporter.hpp"
|
||||
|
||||
#include "coding/traffic.hpp"
|
||||
|
||||
@@ -25,8 +25,8 @@ using namespace platform::tests_support;
|
||||
|
||||
namespace
|
||||
{
|
||||
void TransferLocation(Reporter & reporter, TestSocket & testSocket, double timestamp,
|
||||
double latidute, double longtitude)
|
||||
void TransferLocation(Reporter & reporter, TestSocket & testSocket, double timestamp, double latidute,
|
||||
double longtitude)
|
||||
{
|
||||
location::GpsInfo gpsInfo;
|
||||
gpsInfo.m_timestamp = timestamp;
|
||||
@@ -60,15 +60,15 @@ void TransferLocation(Reporter & reporter, TestSocket & testSocket, double times
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (readSize);
|
||||
}
|
||||
while (readSize);
|
||||
|
||||
TEST(!buffer.empty(), ());
|
||||
vector<coding::TrafficGPSEncoder::DataPoint> points;
|
||||
MemReader memReader(buffer.data(), buffer.size());
|
||||
ReaderSource<MemReader> src(memReader);
|
||||
src.Skip(sizeof(uint32_t /* header */));
|
||||
coding::TrafficGPSEncoder::DeserializeDataPoints(coding::TrafficGPSEncoder::kLatestVersion, src,
|
||||
points);
|
||||
coding::TrafficGPSEncoder::DeserializeDataPoints(coding::TrafficGPSEncoder::kLatestVersion, src, points);
|
||||
|
||||
TEST_EQUAL(points.size(), 1, ());
|
||||
auto const & point = points[0];
|
||||
@@ -76,7 +76,7 @@ void TransferLocation(Reporter & reporter, TestSocket & testSocket, double times
|
||||
TEST(AlmostEqualAbs(point.m_latLon.m_lat, latidute, 0.001), ());
|
||||
TEST(AlmostEqualAbs(point.m_latLon.m_lon, longtitude, 0.001), ());
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
UNIT_TEST(Reporter_Smoke)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user