summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_engine/traverser/traverser.test.cpp
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-03-23 18:47:42 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2022-03-23 20:07:51 +0100
commit7a05bb5cfbf3560b828c226f4a3bad8c3826b039 (patch)
treeed77169173b89492869c787533f27d0bfb95480f /test/buildtool/execution_engine/traverser/traverser.test.cpp
parent45cba2778426601bdffbcfe6aa7310aee76a6e54 (diff)
downloadjustbuild-7a05bb5cfbf3560b828c226f4a3bad8c3826b039.tar.gz
Apply changes suggested by clang-tidy 11
Diffstat (limited to 'test/buildtool/execution_engine/traverser/traverser.test.cpp')
-rw-r--r--test/buildtool/execution_engine/traverser/traverser.test.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/test/buildtool/execution_engine/traverser/traverser.test.cpp b/test/buildtool/execution_engine/traverser/traverser.test.cpp
index 63d1fad6..693097d5 100644
--- a/test/buildtool/execution_engine/traverser/traverser.test.cpp
+++ b/test/buildtool/execution_engine/traverser/traverser.test.cpp
@@ -95,16 +95,20 @@ class TestExecutor {
build_info_->SetName(name_);
bool const all_deps_available = AllAvailable(action->Children());
if (all_deps_available) {
- for (auto const& [name, node] : action->OutputFiles()) {
- if (not build_info_->InsertCorrectlyBuilt(
- node->Content().Id())) {
- [[maybe_unused]] auto was_it_added =
- build_info_->InsertIncorrectlyBuilt(
- node->Content().Id());
- return false;
- }
- }
- return true;
+ return std::all_of(
+ action->OutputFiles().begin(),
+ action->OutputFiles().end(),
+ [this](auto const& entry) {
+ auto const& [name, node] = entry;
+ if (not build_info_->InsertCorrectlyBuilt(
+ node->Content().Id())) {
+ [[maybe_unused]] auto was_it_added =
+ build_info_->InsertIncorrectlyBuilt(
+ node->Content().Id());
+ return false;
+ }
+ return true;
+ });
}
for (auto const& [name, node] : action->OutputFiles()) {
[[maybe_unused]] auto was_it_added =