mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-01 17:15:52 +00:00
style: clang-tidy auto fixes (#1994)
Fixes #1993. Co-authored-by: godexsoft <385326+godexsoft@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2c1a90a20d
commit
99adb31184
@@ -41,8 +41,6 @@
|
||||
#include <boost/asio/spawn.hpp>
|
||||
#include <boost/uuid/random_generator.hpp>
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_hash.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
#include <gtest/gtest.h>
|
||||
#include <xrpl/basics/Slice.h>
|
||||
#include <xrpl/basics/base_uint.h>
|
||||
@@ -1304,7 +1302,7 @@ TEST_F(BackendCassandraTest, CacheIntegration)
|
||||
}
|
||||
|
||||
struct BackendCassandraNodeMessageTest : BackendCassandraTest {
|
||||
boost::uuids::random_generator generateUuid;
|
||||
boost::uuids::random_generator generateUuid{};
|
||||
};
|
||||
|
||||
TEST_F(BackendCassandraNodeMessageTest, UpdateFetch)
|
||||
|
||||
@@ -21,15 +21,11 @@
|
||||
#include "util/TimeUtils.hpp"
|
||||
|
||||
#include <boost/json/object.hpp>
|
||||
#include <boost/json/parse.hpp>
|
||||
#include <boost/json/serialize.hpp>
|
||||
#include <boost/json/value.hpp>
|
||||
#include <boost/json/value_from.hpp>
|
||||
#include <boost/json/value_to.hpp>
|
||||
#include <boost/uuid/random_generator.hpp>
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_generators.hpp>
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
@@ -64,7 +64,7 @@ struct ClusterCommunicationServiceTest : util::prometheus::WithPrometheus, MockB
|
||||
void
|
||||
notify()
|
||||
{
|
||||
std::unique_lock lock{mtx};
|
||||
std::unique_lock const lock{mtx};
|
||||
cv.notify_one();
|
||||
}
|
||||
|
||||
|
||||
@@ -59,11 +59,11 @@ TEST(TimeUtilTests, SystemTpToUtcStr)
|
||||
auto timePoint = std::chrono::system_clock::from_time_t(timegm(&timeStruct));
|
||||
|
||||
std::string const isoFormat = "%Y-%m-%dT%H:%M:%SZ";
|
||||
std::string isoStr = util::systemTpToUtcStr(timePoint, isoFormat);
|
||||
std::string const isoStr = util::systemTpToUtcStr(timePoint, isoFormat);
|
||||
EXPECT_EQ(isoStr, "2023-10-15T14:30:45Z");
|
||||
|
||||
std::string const customFormat = "%d/%m/%Y %H:%M:%S";
|
||||
std::string customStr = util::systemTpToUtcStr(timePoint, customFormat);
|
||||
std::string const customStr = util::systemTpToUtcStr(timePoint, customFormat);
|
||||
EXPECT_EQ(customStr, "15/10/2023 14:30:45");
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ TEST(TimeUtilTests, StringToTimePointToString)
|
||||
auto timePoint = util::systemTpFromUtcStr(originalStr, isoFormat);
|
||||
ASSERT_TRUE(timePoint.has_value());
|
||||
|
||||
std::string convertedStr = util::systemTpToUtcStr(*timePoint, isoFormat);
|
||||
std::string const convertedStr = util::systemTpToUtcStr(*timePoint, isoFormat);
|
||||
EXPECT_EQ(originalStr, convertedStr);
|
||||
|
||||
std::string const customFormat = "%d/%m/%Y %H:%M:%S";
|
||||
@@ -82,7 +82,7 @@ TEST(TimeUtilTests, StringToTimePointToString)
|
||||
auto timePoint2 = util::systemTpFromUtcStr(originalCustomStr, customFormat);
|
||||
ASSERT_TRUE(timePoint2.has_value());
|
||||
|
||||
std::string convertedCustomStr = util::systemTpToUtcStr(*timePoint2, customFormat);
|
||||
std::string const convertedCustomStr = util::systemTpToUtcStr(*timePoint2, customFormat);
|
||||
EXPECT_EQ(originalCustomStr, convertedCustomStr);
|
||||
|
||||
EXPECT_EQ(*timePoint, *timePoint2);
|
||||
|
||||
Reference in New Issue
Block a user