diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-30 12:16:43 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-07 13:37:39 +0200 |
commit | ce23db59c6399199fa55b4b7dc8880522e2f1bca (patch) | |
tree | 5b77d3c84289f023cbe6f4a81cf391a0087fe660 /test | |
parent | e5d7cb5ce5b9cc40b0c56b18980a4234118c1739 (diff) | |
download | justbuild-ce23db59c6399199fa55b4b7dc8880522e2f1bca.tar.gz |
Enable readability-redundant-member-init check.
Diffstat (limited to 'test')
6 files changed, 20 insertions, 20 deletions
diff --git a/test/buildtool/build_engine/expression/linked_map.test.cpp b/test/buildtool/build_engine/expression/linked_map.test.cpp index 4d0bf993..f6c3bd58 100644 --- a/test/buildtool/build_engine/expression/linked_map.test.cpp +++ b/test/buildtool/build_engine/expression/linked_map.test.cpp @@ -113,7 +113,7 @@ class CopyCounter { private: // all copies of this object share the same counter - std::shared_ptr<std::size_t> count_{}; + std::shared_ptr<std::size_t> count_; }; TEST_CASE("Zero copies", "[linked_map]") { @@ -218,7 +218,7 @@ class CustomContainer { [[nodiscard]] auto Map() & noexcept -> linked_map_t& { return map_; } private: - linked_map_t map_{}; + linked_map_t map_; }; TEST_CASE("Custom NextPtr", "[linked_map]") { diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp index 7eeee78f..59b06648 100644 --- a/test/buildtool/execution_engine/executor/executor.test.cpp +++ b/test/buildtool/execution_engine/executor/executor.test.cpp @@ -52,7 +52,7 @@ struct TestApiConfig { struct TestExecutionConfig { bool failed{}; - std::vector<std::string> outputs{}; + std::vector<std::string> outputs; }; struct TestResponseConfig { @@ -60,7 +60,7 @@ struct TestApiConfig { int exit_code{}; }; - std::unordered_map<std::string, TestArtifactConfig> artifacts{}; + std::unordered_map<std::string, TestArtifactConfig> artifacts; TestExecutionConfig execution; TestResponseConfig response; }; diff --git a/test/buildtool/execution_engine/traverser/traverser.test.cpp b/test/buildtool/execution_engine/traverser/traverser.test.cpp index 3fb57871..a6fb2c85 100644 --- a/test/buildtool/execution_engine/traverser/traverser.test.cpp +++ b/test/buildtool/execution_engine/traverser/traverser.test.cpp @@ -95,11 +95,11 @@ class TestBuildInfo { } private: - std::unordered_set<ArtifactIdentifier> correctly_built_{}; - std::unordered_set<ArtifactIdentifier> incorrectly_built_{}; - std::unordered_set<ArtifactIdentifier> artifacts_uploaded_{}; - std::unordered_set<ArtifactIdentifier> uploaded_more_than_once_{}; - std::string name_{}; + std::unordered_set<ArtifactIdentifier> correctly_built_; + std::unordered_set<ArtifactIdentifier> incorrectly_built_; + std::unordered_set<ArtifactIdentifier> artifacts_uploaded_; + std::unordered_set<ArtifactIdentifier> uploaded_more_than_once_; + std::string name_; std::mutex mutex_; }; @@ -218,9 +218,9 @@ class TestProject { } private: - std::vector<ActionDescription> graph_full_description_{}; - std::unordered_set<ArtifactIdentifier> artifacts_to_be_built_{}; - std::unordered_set<ArtifactIdentifier> local_artifacts_{}; + std::vector<ActionDescription> graph_full_description_; + std::unordered_set<ArtifactIdentifier> artifacts_to_be_built_; + std::unordered_set<ArtifactIdentifier> local_artifacts_; }; } // namespace diff --git a/test/buildtool/graph_traverser/graph_traverser.test.hpp b/test/buildtool/graph_traverser/graph_traverser.test.hpp index cb9cb57c..a9839638 100644 --- a/test/buildtool/graph_traverser/graph_traverser.test.hpp +++ b/test/buildtool/graph_traverser/graph_traverser.test.hpp @@ -56,8 +56,8 @@ class TestProject { public: struct CommandLineArguments { GraphTraverser::CommandLineArguments gtargs; - nlohmann::json artifacts{}; - std::filesystem::path graph_description{}; + nlohmann::json artifacts; + std::filesystem::path graph_description; explicit CommandLineArguments( GraphTraverser::CommandLineArguments gtargs) @@ -111,8 +111,8 @@ class TestProject { "test/buildtool/graph_traverser/data/"; static inline std::string const kDefaultEntryPointsFileName = "_entry_points"; - std::string example_name_{}; - std::filesystem::path root_dir_{}; + std::string example_name_; + std::filesystem::path root_dir_; RepositoryConfig repo_config_{}; void SetupConfig() { diff --git a/test/buildtool/logging/logger.test.cpp b/test/buildtool/logging/logger.test.cpp index 474a656f..e0abd13a 100644 --- a/test/buildtool/logging/logger.test.cpp +++ b/test/buildtool/logging/logger.test.cpp @@ -27,8 +27,8 @@ // Stores prints from test sink instances class TestPrints { struct PrintData { - std::atomic<int> counter{}; - std::unordered_map<int, std::vector<std::string>> prints{}; + std::atomic<int> counter; + std::unordered_map<int, std::vector<std::string>> prints; }; public: diff --git a/test/buildtool/multithreading/task_system.test.cpp b/test/buildtool/multithreading/task_system.test.cpp index fb6bbd1f..36b1cc14 100644 --- a/test/buildtool/multithreading/task_system.test.cpp +++ b/test/buildtool/multithreading/task_system.test.cpp @@ -92,10 +92,10 @@ TEST_CASE("Side effects of tasks are reflected out of ts", "[task_system]") { SECTION("Lambda capturing `this` inside struct") { std::string ext_name{}; struct Wrapper { - std::string name{}; + std::string name; // ts must be second, otherwise name will get destroyed before the // task system is finished. - TaskSystem ts{}; + TaskSystem ts; explicit Wrapper(std::string n) : name{std::move(n)} {} |