Skip to content

Commit

Permalink
style: clang-tidy auto fixes (#1585)
Browse files Browse the repository at this point in the history
Fixes #1584. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <[email protected]>
  • Loading branch information
github-actions[bot] and kuznetsss authored Aug 7, 2024
1 parent 2bd7ac3 commit fa1e9da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/util/newconfig/ObjectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "util/newconfig/ValueView.hpp"

#include <fmt/core.h>
#include <unistd.h>

#include <algorithm>
#include <cstddef>
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/util/newconfig/ArrayTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ TEST(ArrayTest, testConfigArray)
ConfigValue{ConfigType::Double}.defaultValue(22.22),
};
auto cv = arr.at(0);
ValueView vv{cv};
ValueView const vv{cv};
EXPECT_EQ(vv.asBool(), false);

auto cv2 = arr.at(1);
ValueView vv2{cv2};
ValueView const vv2{cv2};
EXPECT_EQ(vv2.asIntType<int>(), 1234);

EXPECT_EQ(arr.size(), 3);
arr.emplaceBack(ConfigValue{ConfigType::String}.defaultValue("false"));

EXPECT_EQ(arr.size(), 4);
auto cv4 = arr.at(3);
ValueView vv4{cv4};
ValueView const vv4{cv4};
EXPECT_EQ(vv4.asString(), "false");
}
8 changes: 2 additions & 6 deletions tests/unit/util/newconfig/ClioConfigDefinitionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
#include "util/newconfig/ConfigValue.hpp"
#include "util/newconfig/FakeConfigData.hpp"

#include <boost/json/object.hpp>
#include <boost/json/parse.hpp>
#include <boost/json/value.hpp>
#include <boost/json/value_to.hpp>
#include <gtest/gtest.h>

#include <string_view>
Expand Down Expand Up @@ -151,7 +147,7 @@ TEST_F(NewConfigDeathTest, IncorrectGetArray)

TEST(ConfigDescription, getValues)
{
ClioConfigDescription definition{};
ClioConfigDescription const definition{};

EXPECT_EQ(definition.get("database.type"), "Type of database to use.");
EXPECT_EQ(definition.get("etl_source.[].ip"), "IP address of the ETL source.");
Expand All @@ -160,7 +156,7 @@ TEST(ConfigDescription, getValues)

TEST(ConfigDescriptionAssertDeathTest, nonExistingKeyTest)
{
ClioConfigDescription definition{};
ClioConfigDescription const definition{};

EXPECT_DEATH({ [[maybe_unused]] auto a = definition.get("data"); }, ".*");
EXPECT_DEATH({ [[maybe_unused]] auto a = definition.get("etl_source.[]"); }, ".*");
Expand Down

0 comments on commit fa1e9da

Please sign in to comment.