From b2812487122c97019798b84111a15ccec5a7970f Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Thu, 26 Sep 2024 15:43:53 +0200 Subject: [PATCH] STY: Formatting and linting. --- test/test_async.cpp | 10 +++++----- test/test_clinkahead.cpp | 19 ++++++++++--------- test/test_connection.cpp | 11 +++++++---- test/test_issues.cpp | 18 +++++++++--------- test/test_list_properties.cpp | 16 ++++++++-------- test/test_properties.cpp | 8 ++++---- test/test_select.cpp | 28 ++++++++++++++-------------- test/test_transaction.cpp | 28 ++++++++++++++-------------- test/test_user.cpp | 18 +++++++++--------- 9 files changed, 80 insertions(+), 76 deletions(-) diff --git a/test/test_async.cpp b/test/test_async.cpp index 2b5d358..d428144 100644 --- a/test/test_async.cpp +++ b/test/test_async.cpp @@ -24,11 +24,11 @@ #include "linkahead/status_code.h" // for StatusCode, SUCCESS #include "linkahead/transaction.h" // for Entity, Transaction #include "linkahead/transaction_status.h" // for TransactionStatus -#include <chrono> // for operator""ms, chrono_literals -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult -#include <gtest/gtest_pred_impl.h> // for AssertionResult -#include <memory> // for allocator, unique_ptr, __shar... +#include <chrono> // for operator""ms, chrono_literals +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult +#include <memory> // for allocator, unique_ptr, __shar... #include <thread> namespace linkahead::transaction { diff --git a/test/test_clinkahead.cpp b/test/test_clinkahead.cpp index 84cddd6..9466d03 100644 --- a/test/test_clinkahead.cpp +++ b/test/test_clinkahead.cpp @@ -22,14 +22,14 @@ #include "linkahead/message_code.h" // for ENTITY_DOES_NOT_EXIST #include "linkahead/status_code.h" // for GO_ON, StatusCode #include "clinkahead.h" // for linkahead_connection_... -#include <chrono> // for filesystem -#include <cstring> // for strcmp -#include <filesystem> // for remove -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult -#include <gtest/gtest_pred_impl.h> // for EXPECT_EQ, TestInfo -#include <iostream> // for operator<<, endl -#include <string> // for allocator, string +#include <chrono> // for filesystem +#include <cstring> // for strcmp +#include <filesystem> // for remove +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for EXPECT_EQ, TestInfo +#include <iostream> // for operator<<, endl +#include <string> // for allocator, string namespace fs = std::filesystem; class test_clinkahead : public ::testing::Test { @@ -625,6 +625,7 @@ TEST_F(test_clinkahead, test_up_n_download_file) { EXPECT_EQ(return_code, 0); linkahead_transaction_result_set result_set; - return_code = linkahead_transaction_transaction_get_result_set(&retrieve_transaction_1, &result_set); + return_code = + linkahead_transaction_transaction_get_result_set(&retrieve_transaction_1, &result_set); EXPECT_EQ(return_code, 0); } diff --git a/test/test_connection.cpp b/test/test_connection.cpp index a0f2636..687f08b 100644 --- a/test/test_connection.cpp +++ b/test/test_connection.cpp @@ -27,7 +27,7 @@ #include "linkahead/info.h" // for VersionInfo #include "linkahead/utility.h" // for get_env_fallback #include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE -#include <filesystem> // for path +#include <filesystem> // for path #include <gtest/gtest_pred_impl.h> // NOLINT TODO how to fix this? for Test, TestInfo, TEST, EXPEC... #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPartR... @@ -61,7 +61,8 @@ TEST(test_connection, connect_somehost_42347_fails) { } TEST(test_connection, connection_insecure_authentication_error_anonymous) { - const auto *port_str = linkahead::utility::get_env_fallback("CAOSDB_SERVER_GRPC_PORT_HTTP", "8080"); + const auto *port_str = + linkahead::utility::get_env_fallback("CAOSDB_SERVER_GRPC_PORT_HTTP", "8080"); auto port = std::stoi(port_str); const auto *const host = linkahead::utility::get_env_fallback("CAOSDB_SERVER_HOST", "localhost"); @@ -72,7 +73,8 @@ TEST(test_connection, connection_insecure_authentication_error_anonymous) { } TEST(test_connection, connection_ssl_authentication_error_anonymous) { - const auto *port_str = linkahead::utility::get_env_fallback("CAOSDB_SERVER_GRPC_PORT_HTTPS", "8443"); + const auto *port_str = + linkahead::utility::get_env_fallback("CAOSDB_SERVER_GRPC_PORT_HTTPS", "8443"); auto port = std::stoi(port_str); const auto *const host = linkahead::utility::get_env_fallback("CAOSDB_SERVER_HOST", "localhost"); const auto path = linkahead::utility::get_env_fallback("CAOSDB_SERVER_CERT", std::string()); @@ -88,7 +90,8 @@ TEST(test_connection, connection_ssl_authentication_error_anonymous) { } TEST(test_connection, connection_ssl_authentication_error_wrong_credentials) { - const auto *port_str = linkahead::utility::get_env_fallback("CAOSDB_SERVER_GRPC_PORT_HTTPS", "8443"); + const auto *port_str = + linkahead::utility::get_env_fallback("CAOSDB_SERVER_GRPC_PORT_HTTPS", "8443"); auto port = std::stoi(port_str); const auto *const host = linkahead::utility::get_env_fallback("CAOSDB_SERVER_HOST", "localhost"); const auto path = linkahead::utility::get_env_fallback("CAOSDB_SERVER_CERT", std::string()); diff --git a/test/test_issues.cpp b/test/test_issues.cpp index fd2eeb9..d1631b4 100644 --- a/test/test_issues.cpp +++ b/test/test_issues.cpp @@ -22,15 +22,15 @@ #include "linkahead/entity.h" // for Entity, Parent, Role #include "linkahead/transaction.h" // for Transaction, Entity #include "linkahead/transaction_status.h" // for TransactionStatus -#include <cstdint> // for int32_t -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-spi.h> // for EXPECT_NONFATAL_FA... -#include <gtest/gtest-test-part.h> // for TestPartResult -#include <gtest/gtest_pred_impl.h> // for AssertionResult -#include <iostream> // for operator<<, endl -#include <memory> // for unique_ptr, allocator -#include <string> // for operator+, operator<< -#include <vector> // for vector +#include <cstdint> // for int32_t +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-spi.h> // for EXPECT_NONFATAL_FA... +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult +#include <iostream> // for operator<<, endl +#include <memory> // for unique_ptr, allocator +#include <string> // for operator+, operator<< +#include <vector> // for vector namespace linkahead::transaction { using linkahead::entity::AtomicDataType; diff --git a/test/test_list_properties.cpp b/test/test_list_properties.cpp index 9708e35..d16e9ae 100644 --- a/test/test_list_properties.cpp +++ b/test/test_list_properties.cpp @@ -24,14 +24,14 @@ #include "linkahead/transaction.h" // for Entity, Transaction,... #include "linkahead/transaction_status.h" // for TransactionStatus, StatusCode #include "linkahead/value.h" // for value -#include <cstdint> // for int64_t -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver -#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, AssertionResult -#include <iostream> // for cout -#include <memory> // for unique_ptr, allocator, __shar... -#include <string> // for string -#include <vector> // for vector +#include <cstdint> // for int64_t +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver +#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, AssertionResult +#include <iostream> // for cout +#include <memory> // for unique_ptr, allocator, __shar... +#include <string> // for string +#include <vector> // for vector namespace linkahead::entity { diff --git a/test/test_properties.cpp b/test/test_properties.cpp index cc3f63d..040cc02 100644 --- a/test/test_properties.cpp +++ b/test/test_properties.cpp @@ -23,10 +23,10 @@ #include "linkahead/entity.h" // for Entity, Properties, Property #include "linkahead/transaction.h" // for Transaction, ResultSet, Resul... #include "linkahead/transaction_status.h" // for TransactionStatus -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver -#include <gtest/gtest_pred_impl.h> // for AssertionResult, EXPECT_EQ -#include <memory> // for unique_ptr, allocator, __shar... +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiResolver +#include <gtest/gtest_pred_impl.h> // for AssertionResult, EXPECT_EQ +#include <memory> // for unique_ptr, allocator, __shar... namespace linkahead::entity { diff --git a/test/test_select.cpp b/test/test_select.cpp index d8f6302..ecbd599 100644 --- a/test/test_select.cpp +++ b/test/test_select.cpp @@ -17,20 +17,20 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ -#include "linkahead/connection.h" // for Connection, ConnectionManager -#include "linkahead/data_type.h" // for AtomicDataType -#include "linkahead/entity.h" // for Entity, Property, Role, Parent -#include "linkahead/result_set.h" // for Entity, ResultSet, ResultSet::ite... -#include "linkahead/result_table.h" // for ResultTable::HeaderIterator, Resu... -#include "linkahead/transaction.h" // for Transaction, ResultTable -#include "linkahead/value.h" // for Value -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-spi.h> // for EXPECT_NONFATAL_FA... -#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl -#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, EXPECT_EQ, TEST -#include <iostream> // for operator<<, basic_ostream::operat... -#include <memory> // for allocator, unique_ptr, __shared_p... -#include <string> // for string +#include "linkahead/connection.h" // for Connection, ConnectionManager +#include "linkahead/data_type.h" // for AtomicDataType +#include "linkahead/entity.h" // for Entity, Property, Role, Parent +#include "linkahead/result_set.h" // for Entity, ResultSet, ResultSet::ite... +#include "linkahead/result_table.h" // for ResultTable::HeaderIterator, Resu... +#include "linkahead/transaction.h" // for Transaction, ResultTable +#include "linkahead/value.h" // for Value +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-spi.h> // for EXPECT_NONFATAL_FA... +#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestFactoryImpl +#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, EXPECT_EQ, TEST +#include <iostream> // for operator<<, basic_ostream::operat... +#include <memory> // for allocator, unique_ptr, __shared_p... +#include <string> // for string namespace linkahead::transaction { using linkahead::entity::AtomicDataType; diff --git a/test/test_transaction.cpp b/test/test_transaction.cpp index 34a4348..4e0a996 100644 --- a/test/test_transaction.cpp +++ b/test/test_transaction.cpp @@ -30,20 +30,20 @@ #include "linkahead/transaction.h" // for Entity, Transaction #include "linkahead/transaction_status.h" // for TransactionStatus #include "linkahead/value.h" // for Value -#include <chrono> // for filesystem -#include <cstddef> // for size_t -#include <cstdint> // for int64_t, int32_t -#include <filesystem> // for path -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for TestPartResult -#include <gtest/gtest_pred_impl.h> // for AssertionResult -#include <initializer_list> // for initializer_list -#include <iostream> // for operator<<, endl -#include <limits> // for numeric_limits -#include <memory> // for unique_ptr, allocator -#include <stdexcept> // for logic_error -#include <string> // for string, operator+ -#include <vector> // for vector, operator!= +#include <chrono> // for filesystem +#include <cstddef> // for size_t +#include <cstdint> // for int64_t, int32_t +#include <filesystem> // for path +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for TestPartResult +#include <gtest/gtest_pred_impl.h> // for AssertionResult +#include <initializer_list> // for initializer_list +#include <iostream> // for operator<<, endl +#include <limits> // for numeric_limits +#include <memory> // for unique_ptr, allocator +#include <stdexcept> // for logic_error +#include <string> // for string, operator+ +#include <vector> // for vector, operator!= namespace fs = std::filesystem; namespace linkahead::transaction { diff --git a/test/test_user.cpp b/test/test_user.cpp index 7817aff..ccfc9d1 100644 --- a/test/test_user.cpp +++ b/test/test_user.cpp @@ -18,15 +18,15 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. * */ -#include "linkahead/acm/user.h" // for User -#include "linkahead/connection.h" // for Connection, VersionInfo, path -#include "linkahead/exceptions.h" // for TransactionError -#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE -#include <gtest/gtest-message.h> // for Message -#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPartR... -#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, TEST, EXPEC... -#include <memory> // for allocator, unique_ptr, __sh... -#include <string> // for stoi, string +#include "linkahead/acm/user.h" // for User +#include "linkahead/connection.h" // for Connection, VersionInfo, path +#include "linkahead/exceptions.h" // for TransactionError +#include "linkahead_test_utility.h" // for EXPECT_THROW_MESSAGE +#include <gtest/gtest-message.h> // for Message +#include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPartR... +#include <gtest/gtest_pred_impl.h> // for Test, TestInfo, TEST, EXPEC... +#include <memory> // for allocator, unique_ptr, __sh... +#include <string> // for stoi, string namespace linkahead::connection { using linkahead::acm::User; -- GitLab