From 3c8d7551ad6f3bc535711f78ef393fd5198cc9e2 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Wed, 6 Jul 2022 11:09:23 +0200 Subject: [PATCH] REVIEW: apply reviewers suggestions --- Makefile | 5 ++--- test/test_transaction.cpp | 12 +++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d1b947c..214c6f2 100644 --- a/Makefile +++ b/Makefile @@ -36,14 +36,13 @@ CLANG_TIDY_CMD = $(CLANG_TIDY) \ help: @echo "Targets:" @echo " conan-install - Install locally with Conan." - @echo " style - auto-format the source files." + @echo " format - auto-format the source files." conan-install: conan install . -s "compiler.libcxx=libstdc++11" .PHONY: conan-install -format: conan-install +format: $(CLANG_FORMAT) -i --verbose \ $$(find test/ -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.h.in") - $(CLANG_TIDY_CMD) $$(find test/ -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.h.in") .PHONY: format diff --git a/test/test_transaction.cpp b/test/test_transaction.cpp index 70fe5c6..270043e 100644 --- a/test/test_transaction.cpp +++ b/test/test_transaction.cpp @@ -740,14 +740,12 @@ template <typename T, typename S> auto test_numeric_values_impl(AtomicDataType a const auto t_stat = retrieve_transaction->WaitForIt(); EXPECT_TRUE(t_stat.IsTerminated()); EXPECT_FALSE(t_stat.IsError()); + ASSERT_EQ(retrieve_transaction->GetResultSet().size(), 1); - if (retrieve_transaction->GetResultSet().size() > 0) { - const auto result = retrieve_transaction->GetResultSet().at(0); - EXPECT_EQ(result.GetDataType(), a_type); - const auto &retrieved_value = test_transaction::getValueAs<T>(result.GetValue()); - // std::cout << "retrieved_value: " << retrieved_value << std::endl; - EXPECT_EQ(retrieved_value, value); - } + const auto result = retrieve_transaction->GetResultSet().at(0); + EXPECT_EQ(result.GetDataType(), a_type); + const auto &retrieved_value = test_transaction::getValueAs<T>(result.GetValue()); + EXPECT_EQ(retrieved_value, value); ++i; } } -- GitLab