From 3154d24423e54cb1704d36107ea576eb4372a508 Mon Sep 17 00:00:00 2001 From: klaus triendl Date: Sun, 15 Jan 2023 21:59:58 +0200 Subject: [PATCH] Updated to Catch2 v3 --- appveyor.yml | 8 +++++++- dev/statement_serializer.h | 2 +- tests/CMakeLists.txt | 6 ++---- tests/ast_iterator_tests.cpp | 2 +- tests/backup_tests.cpp | 2 +- .../core_functions_tests.cpp | 2 +- .../datetime_function_tests.cpp | 2 +- tests/built_in_functions_tests/math_functions.cpp | 2 +- tests/column_tests.cpp | 2 +- tests/constraints/check.cpp | 2 +- tests/constraints/composite_key.cpp | 2 +- tests/constraints/default.cpp | 2 +- tests/constraints/foreign_key.cpp | 2 +- tests/constraints/unique.cpp | 8 ++++---- tests/explicit_columns.cpp | 2 +- tests/filename.cpp | 2 +- tests/get_all_custom_containers.cpp | 2 +- tests/index_tests.cpp | 6 +++--- tests/json.cpp | 2 +- tests/operators/arithmetic_operators.cpp | 2 +- tests/operators/between.cpp | 2 +- tests/operators/binary_operators.cpp | 2 +- tests/operators/bitwise.cpp | 2 +- tests/operators/cast.cpp | 2 +- tests/operators/glob.cpp | 2 +- tests/operators/in.cpp | 2 +- tests/operators/is_null.cpp | 2 +- tests/operators/like.cpp | 2 +- tests/operators/not_operator.cpp | 2 +- tests/pointer_passing_interface.cpp | 2 +- tests/pragma_tests.cpp | 2 +- tests/prepared_statement_tests/column_names.cpp | 2 +- tests/prepared_statement_tests/get.cpp | 8 ++++---- tests/prepared_statement_tests/get_all.cpp | 2 +- tests/prepared_statement_tests/get_all_optional.cpp | 2 +- tests/prepared_statement_tests/get_all_pointer.cpp | 2 +- tests/prepared_statement_tests/get_optional.cpp | 2 +- tests/prepared_statement_tests/get_pointer.cpp | 2 +- tests/prepared_statement_tests/insert.cpp | 2 +- tests/prepared_statement_tests/insert_explicit.cpp | 6 +++--- tests/prepared_statement_tests/insert_range.cpp | 8 ++++---- tests/prepared_statement_tests/remove.cpp | 2 +- tests/prepared_statement_tests/remove_all.cpp | 2 +- tests/prepared_statement_tests/replace.cpp | 2 +- tests/prepared_statement_tests/replace_range.cpp | 8 ++++---- tests/prepared_statement_tests/select.cpp | 2 +- tests/prepared_statement_tests/update.cpp | 2 +- tests/prepared_statement_tests/update_all.cpp | 2 +- tests/private_getters_tests.cpp | 2 +- tests/row_id.cpp | 2 +- tests/select_constraints_tests.cpp | 2 +- tests/simple_query.cpp | 2 +- .../aggregate_functions.cpp | 2 +- .../statement_serializer_tests/alias_extractor.cpp | 2 +- .../arithmetic_operators.cpp | 2 +- tests/statement_serializer_tests/ast/excluded.cpp | 2 +- .../ast/upsert_clause.cpp | 2 +- tests/statement_serializer_tests/base_types.cpp | 2 +- tests/statement_serializer_tests/bindables.cpp | 2 +- tests/statement_serializer_tests/collate.cpp | 2 +- .../column_constraints/autoincrement.cpp | 2 +- .../column_constraints/check.cpp | 2 +- .../column_constraints/default.cpp | 2 +- .../column_constraints/generated.cpp | 2 +- .../column_constraints/primary_key.cpp | 2 +- .../column_constraints/unique.cpp | 2 +- tests/statement_serializer_tests/column_names.cpp | 2 +- .../comparison_operators.cpp | 2 +- tests/statement_serializer_tests/conditions.cpp | 2 +- tests/statement_serializer_tests/core_functions.cpp | 2 +- tests/statement_serializer_tests/foreign_key.cpp | 2 +- tests/statement_serializer_tests/indexed_column.cpp | 2 +- .../logical_operators.cpp | 2 +- tests/statement_serializer_tests/rowid.cpp | 2 +- tests/statement_serializer_tests/schema/index.cpp | 2 +- tests/statement_serializer_tests/schema/new_old.cpp | 2 +- tests/statement_serializer_tests/schema/raise.cpp | 2 +- tests/statement_serializer_tests/schema/trigger.cpp | 2 +- .../select_constraints.cpp | 2 +- .../statements/insert_replace.cpp | 2 +- .../statements/remove.cpp | 2 +- .../statements/remove_all.cpp | 2 +- .../statements/select.cpp | 2 +- .../statements/update.cpp | 2 +- .../statements/update_all.cpp | 2 +- .../aggregate_function_return_types.cpp | 2 +- .../arithmetic_operators_result_type.cpp | 2 +- tests/static_tests/bindable_filter.cpp | 2 +- tests/static_tests/column.cpp | 2 +- tests/static_tests/column_result_t.cpp | 2 +- tests/static_tests/compound_operators.cpp | 2 +- tests/static_tests/core_function_return_types.cpp | 2 +- tests/static_tests/foreign_key.cpp | 2 +- tests/static_tests/function_static_tests.cpp | 2 +- tests/static_tests/functional/mpl.cpp | 2 +- tests/static_tests/functional/same_or_void.cpp | 2 +- tests/static_tests/functional/static_if_tests.cpp | 2 +- tests/static_tests/functional/tuple_conc.cpp | 2 +- tests/static_tests/functional/tuple_filter.cpp | 2 +- tests/static_tests/functional/tuple_traits.cpp | 2 +- tests/static_tests/functional/tuple_transform.cpp | 2 +- tests/static_tests/is_bindable.cpp | 2 +- .../is_column_with_insertable_primary_key.cpp | 2 +- tests/static_tests/is_primary_key_insertable.cpp | 2 +- tests/static_tests/is_printable.cpp | 2 +- tests/static_tests/iterator_t.cpp | 2 +- tests/static_tests/member_traits_tests.cpp | 2 +- tests/static_tests/node_tuple.cpp | 2 +- tests/static_tests/select_return_type.cpp | 2 +- tests/storage_non_crud_tests.cpp | 8 ++++---- tests/storage_tests.cpp | 2 +- tests/sync_schema_tests.cpp | 2 +- tests/table_tests.cpp | 2 +- tests/tests.cpp | 13 +++++-------- tests/tests2.cpp | 6 +++--- tests/tests3.cpp | 2 +- tests/tests4.cpp | 2 +- tests/tests5.cpp | 2 +- tests/transaction_tests.cpp | 6 +++--- tests/trigger_tests.cpp | 2 +- tests/tuple_iteration.cpp | 2 +- tests/unique_cases/delete_with_two_fields.cpp | 2 +- tests/unique_cases/get_all_with_two_tables.cpp | 2 +- tests/unique_cases/index_named_table_with_fk.cpp | 2 +- tests/unique_cases/issue525.cpp | 2 +- tests/unique_cases/issue663.cpp | 2 +- tests/unique_cases/issue86.cpp | 2 +- tests/unique_cases/issue937.cpp | 2 +- .../join_iterator_ctor_compilation_error.cpp | 2 +- tests/unique_cases/prepare_get_all_with_case.cpp | 2 +- 130 files changed, 164 insertions(+), 163 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 69743a6b8..205cadb12 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -96,6 +96,10 @@ for: if "%appveyor_build_worker_image%"=="Visual Studio 2015" (set generator="Visual Studio 14 2015" %architecture%) install: - |- + cd C:\Tools\vcpkg + git clone --depth 1 --branch 2023.01.09 https://github.com/microsoft/vcpkg.git "$HOME/vcpkg" + .\bootstrap-vcpkg.bat + cd "%APPVEYOR_BUILD_FOLDER%" C:\Tools\vcpkg\vcpkg integrate install vcpkg install sqlite3:%platform%-windows before_build: @@ -121,6 +125,8 @@ for: # using custom vcpkg triplets for building and linking dynamic dependent libraries install: - |- + git clone --depth 1 --branch 2023.01.09 https://github.com/microsoft/vcpkg.git $HOME/vcpkg + $HOME/vcpkg/booststrap.sh $HOME/vcpkg/vcpkg integrate install --overlay-triplets=vcpkg/triplets vcpkg install sqlite3 --overlay-triplets=vcpkg/triplets before_build: @@ -145,7 +151,7 @@ for: # using custom vcpkg triplets for building and linking dynamic dependent libraries install: - |- - git clone --depth 1 --branch 2022.05.10 https://github.com/microsoft/vcpkg.git $HOME/vcpkg + git clone --depth 1 --branch 2023.01.09 https://github.com/microsoft/vcpkg.git $HOME/vcpkg $HOME/vcpkg/booststrap.sh $HOME/vcpkg/vcpkg integrate install --overlay-triplets=vcpkg/triplets vcpkg install sqlite3 --overlay-triplets=vcpkg/triplets diff --git a/dev/statement_serializer.h b/dev/statement_serializer.h index cfe5dac2c..28ae2b8f4 100644 --- a/dev/statement_serializer.h +++ b/dev/statement_serializer.h @@ -788,7 +788,7 @@ namespace sqlite_orm { using statement_type = conflict_clause_t; template - std::string operator()(const statement_type& statement, const Ctx& context) const { + std::string operator()(const statement_type& statement, const Ctx&) const { switch(statement) { case conflict_clause_t::rollback: return "ROLLBACK"; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d816ebc33..69e491383 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -159,11 +159,9 @@ endif() target_precompile_headers(unit_tests PRIVATE - ) -# tests.cpp contains CATCH_CONFIG_MAIN -set_source_files_properties(tests.cpp PROPERTIES SKIP_PRECOMPILE_HEADERS ON) + ) -target_link_libraries(unit_tests PRIVATE sqlite_orm Catch2::Catch2) +target_link_libraries(unit_tests PRIVATE sqlite_orm Catch2::Catch2WithMain) add_test(NAME "All_in_one_unit_test" COMMAND unit_tests diff --git a/tests/ast_iterator_tests.cpp b/tests/ast_iterator_tests.cpp index 746cfd852..761548e4d 100644 --- a/tests/ast_iterator_tests.cpp +++ b/tests/ast_iterator_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/backup_tests.cpp b/tests/backup_tests.cpp index 7db85cb8c..0f127cd0d 100644 --- a/tests/backup_tests.cpp +++ b/tests/backup_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // remove using namespace sqlite_orm; diff --git a/tests/built_in_functions_tests/core_functions_tests.cpp b/tests/built_in_functions_tests/core_functions_tests.cpp index 253970b7a..312cbc85d 100644 --- a/tests/built_in_functions_tests/core_functions_tests.cpp +++ b/tests/built_in_functions_tests/core_functions_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/built_in_functions_tests/datetime_function_tests.cpp b/tests/built_in_functions_tests/datetime_function_tests.cpp index 4cc113e15..b6e0812b9 100644 --- a/tests/built_in_functions_tests/datetime_function_tests.cpp +++ b/tests/built_in_functions_tests/datetime_function_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/built_in_functions_tests/math_functions.cpp b/tests/built_in_functions_tests/math_functions.cpp index 644643b29..47d9df290 100644 --- a/tests/built_in_functions_tests/math_functions.cpp +++ b/tests/built_in_functions_tests/math_functions.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/column_tests.cpp b/tests/column_tests.cpp index 28e2ddd46..df7c25d66 100644 --- a/tests/column_tests.cpp +++ b/tests/column_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/constraints/check.cpp b/tests/constraints/check.cpp index e6129f799..233d84873 100644 --- a/tests/constraints/check.cpp +++ b/tests/constraints/check.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/constraints/composite_key.cpp b/tests/constraints/composite_key.cpp index 95a69ca31..91d9b06f0 100644 --- a/tests/constraints/composite_key.cpp +++ b/tests/constraints/composite_key.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/constraints/default.cpp b/tests/constraints/default.cpp index 6658e8f73..e59c63ee0 100644 --- a/tests/constraints/default.cpp +++ b/tests/constraints/default.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/constraints/foreign_key.cpp b/tests/constraints/foreign_key.cpp index 794a7f28e..436b69503 100644 --- a/tests/constraints/foreign_key.cpp +++ b/tests/constraints/foreign_key.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same diff --git a/tests/constraints/unique.cpp b/tests/constraints/unique.cpp index 561f768bc..300570a60 100644 --- a/tests/constraints/unique.cpp +++ b/tests/constraints/unique.cpp @@ -1,10 +1,10 @@ #include -#include +#include using namespace sqlite_orm; TEST_CASE("Unique") { - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; struct Contact { int id = 0; @@ -57,11 +57,11 @@ TEST_CASE("Unique") { storage.insert(Contact{0, "John", "Doe", "john.doe@gmail.com"}); REQUIRE_THROWS_WITH(storage.insert(Contact{0, "Johnny", "Doe", "john.doe@gmail.com"}), - Contains("constraint failed")); + ContainsSubstring("constraint failed")); storage.insert(Shape{0, "red", "green"}); storage.insert(Shape{0, "red", "blue"}); - REQUIRE_THROWS_WITH(storage.insert(Shape{0, "red", "green"}), Contains("constraint failed")); + REQUIRE_THROWS_WITH(storage.insert(Shape{0, "red", "green"}), ContainsSubstring("constraint failed")); std::vector lists(2); REQUIRE_NOTHROW(storage.insert_range(lists.begin(), lists.end())); diff --git a/tests/explicit_columns.cpp b/tests/explicit_columns.cpp index 9817b6ad8..5762aa8e2 100644 --- a/tests/explicit_columns.cpp +++ b/tests/explicit_columns.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/filename.cpp b/tests/filename.cpp index 5f1e72262..e779ab836 100644 --- a/tests/filename.cpp +++ b/tests/filename.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/get_all_custom_containers.cpp b/tests/get_all_custom_containers.cpp index 55ff0f505..00eaf931d 100644 --- a/tests/get_all_custom_containers.cpp +++ b/tests/get_all_custom_containers.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/tests/index_tests.cpp b/tests/index_tests.cpp index 98396a90e..f0bfa5ef3 100644 --- a/tests/index_tests.cpp +++ b/tests/index_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; @@ -48,7 +48,7 @@ TEST_CASE("index") { #ifdef SQLITE_ORM_OPTIONAL_SUPPORTED TEST_CASE("filtered index") { - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; struct Test { std::optional field1 = 0; @@ -62,7 +62,7 @@ TEST_CASE("filtered index") { REQUIRE_NOTHROW(storage.sync_schema()); storage.insert(Test{1, std::nullopt}); - REQUIRE_THROWS_WITH(storage.insert(Test{1, std::nullopt}), Contains("constraint failed")); + REQUIRE_THROWS_WITH(storage.insert(Test{1, std::nullopt}), ContainsSubstring("constraint failed")); } SECTION("2") { auto storage = make_storage( diff --git a/tests/json.cpp b/tests/json.cpp index 48cb973c9..1f5769782 100644 --- a/tests/json.cpp +++ b/tests/json.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/arithmetic_operators.cpp b/tests/operators/arithmetic_operators.cpp index 07e7c42d1..d0d92083d 100644 --- a/tests/operators/arithmetic_operators.cpp +++ b/tests/operators/arithmetic_operators.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/between.cpp b/tests/operators/between.cpp index dac17f575..c1e52f1fa 100644 --- a/tests/operators/between.cpp +++ b/tests/operators/between.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/binary_operators.cpp b/tests/operators/binary_operators.cpp index a1c14e9ba..89ad8667a 100644 --- a/tests/operators/binary_operators.cpp +++ b/tests/operators/binary_operators.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/bitwise.cpp b/tests/operators/bitwise.cpp index 4749b5d13..7492a2c12 100644 --- a/tests/operators/bitwise.cpp +++ b/tests/operators/bitwise.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/cast.cpp b/tests/operators/cast.cpp index a214de379..9122f72af 100644 --- a/tests/operators/cast.cpp +++ b/tests/operators/cast.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/glob.cpp b/tests/operators/glob.cpp index 2c87ca684..d44c92ab1 100644 --- a/tests/operators/glob.cpp +++ b/tests/operators/glob.cpp @@ -2,7 +2,7 @@ * Obtained from here https://www.tutlane.com/tutorial/sqlite/sqlite-glob-operator */ #include -#include +#include #include // std::vector #include // std::find_if, std::count diff --git a/tests/operators/in.cpp b/tests/operators/in.cpp index a4b570d29..e48b1a93a 100644 --- a/tests/operators/in.cpp +++ b/tests/operators/in.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/is_null.cpp b/tests/operators/is_null.cpp index c9a1218c6..c358ab3f0 100644 --- a/tests/operators/is_null.cpp +++ b/tests/operators/is_null.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/like.cpp b/tests/operators/like.cpp index 3f7bb9e8b..18a701cf6 100644 --- a/tests/operators/like.cpp +++ b/tests/operators/like.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/operators/not_operator.cpp b/tests/operators/not_operator.cpp index 786b42fad..78b40c1d0 100644 --- a/tests/operators/not_operator.cpp +++ b/tests/operators/not_operator.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/pointer_passing_interface.cpp b/tests/pointer_passing_interface.cpp index b9eafb9b0..5a13c80c6 100644 --- a/tests/pointer_passing_interface.cpp +++ b/tests/pointer_passing_interface.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; using std::unique_ptr; diff --git a/tests/pragma_tests.cpp b/tests/pragma_tests.cpp index d4099a0c4..691e9cb42 100644 --- a/tests/pragma_tests.cpp +++ b/tests/pragma_tests.cpp @@ -1,6 +1,6 @@ #include #include // ::remove -#include +#include using namespace sqlite_orm; diff --git a/tests/prepared_statement_tests/column_names.cpp b/tests/prepared_statement_tests/column_names.cpp index 09350ca9d..2bb5cbea6 100644 --- a/tests/prepared_statement_tests/column_names.cpp +++ b/tests/prepared_statement_tests/column_names.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/prepared_statement_tests/get.cpp b/tests/prepared_statement_tests/get.cpp index cf780b9eb..5add455e4 100644 --- a/tests/prepared_statement_tests/get.cpp +++ b/tests/prepared_statement_tests/get.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" @@ -7,7 +7,7 @@ using namespace sqlite_orm; TEST_CASE("Prepared get") { using namespace PreparedStatementTests; - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; using Catch::Matchers::UnorderedEquals; const int defaultVisitTime = 50; @@ -72,7 +72,7 @@ TEST_CASE("Prepared get") { } { get<0>(statement) = 4; - REQUIRE_THROWS_WITH(storage.execute(statement), Contains("Not found")); + REQUIRE_THROWS_WITH(storage.execute(statement), ContainsSubstring("Not found")); } } } @@ -94,7 +94,7 @@ TEST_CASE("Prepared get") { //.. } SECTION("execute") { - REQUIRE_THROWS_WITH(storage.execute(statement), Contains("Not found")); + REQUIRE_THROWS_WITH(storage.execute(statement), ContainsSubstring("Not found")); } } { diff --git a/tests/prepared_statement_tests/get_all.cpp b/tests/prepared_statement_tests/get_all.cpp index 6d85bba48..5f40fa7f2 100644 --- a/tests/prepared_statement_tests/get_all.cpp +++ b/tests/prepared_statement_tests/get_all.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/get_all_optional.cpp b/tests/prepared_statement_tests/get_all_optional.cpp index e49de3259..55db5512b 100644 --- a/tests/prepared_statement_tests/get_all_optional.cpp +++ b/tests/prepared_statement_tests/get_all_optional.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/get_all_pointer.cpp b/tests/prepared_statement_tests/get_all_pointer.cpp index c8a7c3bbc..f02326b9a 100644 --- a/tests/prepared_statement_tests/get_all_pointer.cpp +++ b/tests/prepared_statement_tests/get_all_pointer.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/get_optional.cpp b/tests/prepared_statement_tests/get_optional.cpp index 2fe611a32..0ce3bd583 100644 --- a/tests/prepared_statement_tests/get_optional.cpp +++ b/tests/prepared_statement_tests/get_optional.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/get_pointer.cpp b/tests/prepared_statement_tests/get_pointer.cpp index 46f6a30f1..e5b8c26a5 100644 --- a/tests/prepared_statement_tests/get_pointer.cpp +++ b/tests/prepared_statement_tests/get_pointer.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/insert.cpp b/tests/prepared_statement_tests/insert.cpp index c101033e1..087a3dc87 100644 --- a/tests/prepared_statement_tests/insert.cpp +++ b/tests/prepared_statement_tests/insert.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/insert_explicit.cpp b/tests/prepared_statement_tests/insert_explicit.cpp index 85d26c750..f787f1f50 100644 --- a/tests/prepared_statement_tests/insert_explicit.cpp +++ b/tests/prepared_statement_tests/insert_explicit.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" @@ -7,7 +7,7 @@ using namespace sqlite_orm; TEST_CASE("Prepared insert explicit") { using namespace PreparedStatementTests; - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; using Catch::Matchers::UnorderedEquals; const int defaultVisitTime = 50; @@ -67,7 +67,7 @@ TEST_CASE("Prepared insert explicit") { { user.id = 6; user.name = "Nate Dogg"; - REQUIRE_THROWS_WITH(storage.execute(statement), Contains("constraint failed")); + REQUIRE_THROWS_WITH(storage.execute(statement), ContainsSubstring("constraint failed")); get<0>(statement) = user; auto insertedId = storage.execute(statement); diff --git a/tests/prepared_statement_tests/insert_range.cpp b/tests/prepared_statement_tests/insert_range.cpp index 763b5df16..388d22ba8 100644 --- a/tests/prepared_statement_tests/insert_range.cpp +++ b/tests/prepared_statement_tests/insert_range.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include "prepared_common.h" @@ -8,7 +8,7 @@ using namespace sqlite_orm; TEST_CASE("Prepared insert range") { using namespace PreparedStatementTests; - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; using Catch::Matchers::UnorderedEquals; const int defaultVisitTime = 50; @@ -48,14 +48,14 @@ TEST_CASE("Prepared insert range") { SECTION("empty") { SECTION("strict") { REQUIRE_THROWS_WITH(storage.prepare(insert_range(users.begin(), users.end())), - Contains("incomplete input")); + ContainsSubstring("incomplete input")); } SECTION("container with pointers") { std::vector> usersPointers; REQUIRE_THROWS_WITH( storage.prepare( insert_range(usersPointers.begin(), usersPointers.end(), &std::unique_ptr::operator*)), - Contains("incomplete input")); + ContainsSubstring("incomplete input")); } } SECTION("one") { diff --git a/tests/prepared_statement_tests/remove.cpp b/tests/prepared_statement_tests/remove.cpp index cd757ae31..7e0664d6c 100644 --- a/tests/prepared_statement_tests/remove.cpp +++ b/tests/prepared_statement_tests/remove.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/remove_all.cpp b/tests/prepared_statement_tests/remove_all.cpp index ebc51bb15..fafc0fdf7 100644 --- a/tests/prepared_statement_tests/remove_all.cpp +++ b/tests/prepared_statement_tests/remove_all.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/replace.cpp b/tests/prepared_statement_tests/replace.cpp index 2935d8148..45f177540 100644 --- a/tests/prepared_statement_tests/replace.cpp +++ b/tests/prepared_statement_tests/replace.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/replace_range.cpp b/tests/prepared_statement_tests/replace_range.cpp index 5f9cb15cc..aeca31240 100644 --- a/tests/prepared_statement_tests/replace_range.cpp +++ b/tests/prepared_statement_tests/replace_range.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" @@ -44,18 +44,18 @@ TEST_CASE("Prepared replace range") { return *pointer; }; SECTION("empty") { - using namespace Catch::Matchers; + using Catch::Matchers::ContainsSubstring; expected.push_back(User{1, "Team BS"}); expected.push_back(User{2, "Shy'm"}); expected.push_back(User{3, "MaƮtre Gims"}); SECTION("straight") { REQUIRE_THROWS_WITH(storage.prepare(replace_range(users.begin(), users.end())), - Contains("incomplete input")); + ContainsSubstring("incomplete input")); } SECTION("pointers") { REQUIRE_THROWS_WITH(storage.prepare(replace_range(userPointers.begin(), userPointers.end(), lambda)), - Contains("incomplete input")); + ContainsSubstring("incomplete input")); } } SECTION("one existing") { diff --git a/tests/prepared_statement_tests/select.cpp b/tests/prepared_statement_tests/select.cpp index 8971d49d3..255879d68 100644 --- a/tests/prepared_statement_tests/select.cpp +++ b/tests/prepared_statement_tests/select.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/update.cpp b/tests/prepared_statement_tests/update.cpp index 64046cccf..666274dea 100644 --- a/tests/prepared_statement_tests/update.cpp +++ b/tests/prepared_statement_tests/update.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/prepared_statement_tests/update_all.cpp b/tests/prepared_statement_tests/update_all.cpp index a56b0304b..cfa711777 100644 --- a/tests/prepared_statement_tests/update_all.cpp +++ b/tests/prepared_statement_tests/update_all.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "prepared_common.h" diff --git a/tests/private_getters_tests.cpp b/tests/private_getters_tests.cpp index 57ba1efd0..21e72400c 100644 --- a/tests/private_getters_tests.cpp +++ b/tests/private_getters_tests.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include using namespace sqlite_orm; diff --git a/tests/row_id.cpp b/tests/row_id.cpp index 7c3892371..2b65c1d61 100644 --- a/tests/row_id.cpp +++ b/tests/row_id.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/select_constraints_tests.cpp b/tests/select_constraints_tests.cpp index 1b73587ab..bf085276c 100644 --- a/tests/select_constraints_tests.cpp +++ b/tests/select_constraints_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/simple_query.cpp b/tests/simple_query.cpp index bdeb9199a..e98617581 100644 --- a/tests/simple_query.cpp +++ b/tests/simple_query.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/aggregate_functions.cpp b/tests/statement_serializer_tests/aggregate_functions.cpp index 13df94dce..5474ddc9e 100644 --- a/tests/statement_serializer_tests/aggregate_functions.cpp +++ b/tests/statement_serializer_tests/aggregate_functions.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/alias_extractor.cpp b/tests/statement_serializer_tests/alias_extractor.cpp index f29c0fdd4..3982acb95 100644 --- a/tests/statement_serializer_tests/alias_extractor.cpp +++ b/tests/statement_serializer_tests/alias_extractor.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; using internal::alias_extractor; diff --git a/tests/statement_serializer_tests/arithmetic_operators.cpp b/tests/statement_serializer_tests/arithmetic_operators.cpp index 538998c5a..29248eb54 100644 --- a/tests/statement_serializer_tests/arithmetic_operators.cpp +++ b/tests/statement_serializer_tests/arithmetic_operators.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/ast/excluded.cpp b/tests/statement_serializer_tests/ast/excluded.cpp index 23969b1ae..d84b64f21 100644 --- a/tests/statement_serializer_tests/ast/excluded.cpp +++ b/tests/statement_serializer_tests/ast/excluded.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/ast/upsert_clause.cpp b/tests/statement_serializer_tests/ast/upsert_clause.cpp index a7a3bf3d9..ab36b5e87 100644 --- a/tests/statement_serializer_tests/ast/upsert_clause.cpp +++ b/tests/statement_serializer_tests/ast/upsert_clause.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/base_types.cpp b/tests/statement_serializer_tests/base_types.cpp index 2b3075645..142f649da 100644 --- a/tests/statement_serializer_tests/base_types.cpp +++ b/tests/statement_serializer_tests/base_types.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/bindables.cpp b/tests/statement_serializer_tests/bindables.cpp index 2f4f59e43..51bd88c3b 100644 --- a/tests/statement_serializer_tests/bindables.cpp +++ b/tests/statement_serializer_tests/bindables.cpp @@ -3,7 +3,7 @@ #include #include // std::fill_n #include -#include +#include using std::array; using std::index_sequence; diff --git a/tests/statement_serializer_tests/collate.cpp b/tests/statement_serializer_tests/collate.cpp index 1887ab70f..df60624f5 100644 --- a/tests/statement_serializer_tests/collate.cpp +++ b/tests/statement_serializer_tests/collate.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/column_constraints/autoincrement.cpp b/tests/statement_serializer_tests/column_constraints/autoincrement.cpp index a80e8f583..08c48cf76 100644 --- a/tests/statement_serializer_tests/column_constraints/autoincrement.cpp +++ b/tests/statement_serializer_tests/column_constraints/autoincrement.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/column_constraints/check.cpp b/tests/statement_serializer_tests/column_constraints/check.cpp index d542b5a0e..b5d892778 100644 --- a/tests/statement_serializer_tests/column_constraints/check.cpp +++ b/tests/statement_serializer_tests/column_constraints/check.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/column_constraints/default.cpp b/tests/statement_serializer_tests/column_constraints/default.cpp index 777b8ac6d..0b78cbdfe 100644 --- a/tests/statement_serializer_tests/column_constraints/default.cpp +++ b/tests/statement_serializer_tests/column_constraints/default.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/column_constraints/generated.cpp b/tests/statement_serializer_tests/column_constraints/generated.cpp index 1684448fc..3bd14d62b 100644 --- a/tests/statement_serializer_tests/column_constraints/generated.cpp +++ b/tests/statement_serializer_tests/column_constraints/generated.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/column_constraints/primary_key.cpp b/tests/statement_serializer_tests/column_constraints/primary_key.cpp index 7a3b511d6..53e5fadf5 100644 --- a/tests/statement_serializer_tests/column_constraints/primary_key.cpp +++ b/tests/statement_serializer_tests/column_constraints/primary_key.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/column_constraints/unique.cpp b/tests/statement_serializer_tests/column_constraints/unique.cpp index c59314c81..a3768c981 100644 --- a/tests/statement_serializer_tests/column_constraints/unique.cpp +++ b/tests/statement_serializer_tests/column_constraints/unique.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/column_names.cpp b/tests/statement_serializer_tests/column_names.cpp index 8509f5cfd..1cc7dc48f 100644 --- a/tests/statement_serializer_tests/column_names.cpp +++ b/tests/statement_serializer_tests/column_names.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/comparison_operators.cpp b/tests/statement_serializer_tests/comparison_operators.cpp index 7724453a9..6b4f41f1e 100644 --- a/tests/statement_serializer_tests/comparison_operators.cpp +++ b/tests/statement_serializer_tests/comparison_operators.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/conditions.cpp b/tests/statement_serializer_tests/conditions.cpp index 8fee838b9..c4376324e 100644 --- a/tests/statement_serializer_tests/conditions.cpp +++ b/tests/statement_serializer_tests/conditions.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/core_functions.cpp b/tests/statement_serializer_tests/core_functions.cpp index 024495b99..85291e33c 100644 --- a/tests/statement_serializer_tests/core_functions.cpp +++ b/tests/statement_serializer_tests/core_functions.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/foreign_key.cpp b/tests/statement_serializer_tests/foreign_key.cpp index efb7f2146..4a938fe99 100644 --- a/tests/statement_serializer_tests/foreign_key.cpp +++ b/tests/statement_serializer_tests/foreign_key.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same diff --git a/tests/statement_serializer_tests/indexed_column.cpp b/tests/statement_serializer_tests/indexed_column.cpp index 8160aee56..2c4955035 100644 --- a/tests/statement_serializer_tests/indexed_column.cpp +++ b/tests/statement_serializer_tests/indexed_column.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/logical_operators.cpp b/tests/statement_serializer_tests/logical_operators.cpp index f3c2f436c..679252b14 100644 --- a/tests/statement_serializer_tests/logical_operators.cpp +++ b/tests/statement_serializer_tests/logical_operators.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/rowid.cpp b/tests/statement_serializer_tests/rowid.cpp index b49196404..8d455cfa7 100644 --- a/tests/statement_serializer_tests/rowid.cpp +++ b/tests/statement_serializer_tests/rowid.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/schema/index.cpp b/tests/statement_serializer_tests/schema/index.cpp index b2a670112..12ebdc3ee 100644 --- a/tests/statement_serializer_tests/schema/index.cpp +++ b/tests/statement_serializer_tests/schema/index.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/schema/new_old.cpp b/tests/statement_serializer_tests/schema/new_old.cpp index 6d4f8e823..fcdf0711c 100644 --- a/tests/statement_serializer_tests/schema/new_old.cpp +++ b/tests/statement_serializer_tests/schema/new_old.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/schema/raise.cpp b/tests/statement_serializer_tests/schema/raise.cpp index 584b5cab4..15430e73a 100644 --- a/tests/statement_serializer_tests/schema/raise.cpp +++ b/tests/statement_serializer_tests/schema/raise.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/schema/trigger.cpp b/tests/statement_serializer_tests/schema/trigger.cpp index e3a5703fb..28c9d00ff 100644 --- a/tests/statement_serializer_tests/schema/trigger.cpp +++ b/tests/statement_serializer_tests/schema/trigger.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/select_constraints.cpp b/tests/statement_serializer_tests/select_constraints.cpp index e473accda..29861b4d6 100644 --- a/tests/statement_serializer_tests/select_constraints.cpp +++ b/tests/statement_serializer_tests/select_constraints.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/statements/insert_replace.cpp b/tests/statement_serializer_tests/statements/insert_replace.cpp index 400616625..c5eb90b30 100644 --- a/tests/statement_serializer_tests/statements/insert_replace.cpp +++ b/tests/statement_serializer_tests/statements/insert_replace.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/statements/remove.cpp b/tests/statement_serializer_tests/statements/remove.cpp index b30b00d7f..06a1f6623 100644 --- a/tests/statement_serializer_tests/statements/remove.cpp +++ b/tests/statement_serializer_tests/statements/remove.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/statements/remove_all.cpp b/tests/statement_serializer_tests/statements/remove_all.cpp index 34403a4e5..aeb2ba408 100644 --- a/tests/statement_serializer_tests/statements/remove_all.cpp +++ b/tests/statement_serializer_tests/statements/remove_all.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/statements/select.cpp b/tests/statement_serializer_tests/statements/select.cpp index b5f09c87c..efe7a1096 100644 --- a/tests/statement_serializer_tests/statements/select.cpp +++ b/tests/statement_serializer_tests/statements/select.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/statements/update.cpp b/tests/statement_serializer_tests/statements/update.cpp index 3cf3105dd..3dc87dfc1 100644 --- a/tests/statement_serializer_tests/statements/update.cpp +++ b/tests/statement_serializer_tests/statements/update.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/statement_serializer_tests/statements/update_all.cpp b/tests/statement_serializer_tests/statements/update_all.cpp index 67164e040..6931a5a85 100644 --- a/tests/statement_serializer_tests/statements/update_all.cpp +++ b/tests/statement_serializer_tests/statements/update_all.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/static_tests/aggregate_function_return_types.cpp b/tests/static_tests/aggregate_function_return_types.cpp index 4ecfa97b8..ff5ed9208 100644 --- a/tests/static_tests/aggregate_function_return_types.cpp +++ b/tests/static_tests/aggregate_function_return_types.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same using namespace sqlite_orm; diff --git a/tests/static_tests/arithmetic_operators_result_type.cpp b/tests/static_tests/arithmetic_operators_result_type.cpp index 30642c54e..4fc246735 100644 --- a/tests/static_tests/arithmetic_operators_result_type.cpp +++ b/tests/static_tests/arithmetic_operators_result_type.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same using namespace sqlite_orm; diff --git a/tests/static_tests/bindable_filter.cpp b/tests/static_tests/bindable_filter.cpp index a58676f02..afaff9f96 100644 --- a/tests/static_tests/bindable_filter.cpp +++ b/tests/static_tests/bindable_filter.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same #ifdef SQLITE_ORM_OPTIONAL_SUPPORTED #include diff --git a/tests/static_tests/column.cpp b/tests/static_tests/column.cpp index e50b1ffc0..40de6965d 100644 --- a/tests/static_tests/column.cpp +++ b/tests/static_tests/column.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "static_tests_common.h" diff --git a/tests/static_tests/column_result_t.cpp b/tests/static_tests/column_result_t.cpp index 0a20ceb8b..d933a13d7 100644 --- a/tests/static_tests/column_result_t.cpp +++ b/tests/static_tests/column_result_t.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same using namespace sqlite_orm; diff --git a/tests/static_tests/compound_operators.cpp b/tests/static_tests/compound_operators.cpp index 0b761d3c2..164502e3b 100644 --- a/tests/static_tests/compound_operators.cpp +++ b/tests/static_tests/compound_operators.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "static_tests_common.h" diff --git a/tests/static_tests/core_function_return_types.cpp b/tests/static_tests/core_function_return_types.cpp index a3d8c9de7..333bc30b4 100644 --- a/tests/static_tests/core_function_return_types.cpp +++ b/tests/static_tests/core_function_return_types.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same #include // nullptr_t diff --git a/tests/static_tests/foreign_key.cpp b/tests/static_tests/foreign_key.cpp index 3804f1c44..60ed3fe8a 100644 --- a/tests/static_tests/foreign_key.cpp +++ b/tests/static_tests/foreign_key.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same #include // std::string diff --git a/tests/static_tests/function_static_tests.cpp b/tests/static_tests/function_static_tests.cpp index 44790b948..a3989631a 100644 --- a/tests/static_tests/function_static_tests.cpp +++ b/tests/static_tests/function_static_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same using namespace sqlite_orm; diff --git a/tests/static_tests/functional/mpl.cpp b/tests/static_tests/functional/mpl.cpp index 00fbaea4a..928238547 100644 --- a/tests/static_tests/functional/mpl.cpp +++ b/tests/static_tests/functional/mpl.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/static_tests/functional/same_or_void.cpp b/tests/static_tests/functional/same_or_void.cpp index 4bc6b53db..1f58d4a1d 100644 --- a/tests/static_tests/functional/same_or_void.cpp +++ b/tests/static_tests/functional/same_or_void.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same #include // std::string diff --git a/tests/static_tests/functional/static_if_tests.cpp b/tests/static_tests/functional/static_if_tests.cpp index 19b7f0ab7..e9157337b 100644 --- a/tests/static_tests/functional/static_if_tests.cpp +++ b/tests/static_tests/functional/static_if_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; using internal::call_if_constexpr; diff --git a/tests/static_tests/functional/tuple_conc.cpp b/tests/static_tests/functional/tuple_conc.cpp index f55f5bea4..7291c6d92 100644 --- a/tests/static_tests/functional/tuple_conc.cpp +++ b/tests/static_tests/functional/tuple_conc.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::string #include // std::is_same diff --git a/tests/static_tests/functional/tuple_filter.cpp b/tests/static_tests/functional/tuple_filter.cpp index 552c8c122..16c16107f 100644 --- a/tests/static_tests/functional/tuple_filter.cpp +++ b/tests/static_tests/functional/tuple_filter.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same using namespace sqlite_orm; diff --git a/tests/static_tests/functional/tuple_traits.cpp b/tests/static_tests/functional/tuple_traits.cpp index f8690170b..d11d43a7f 100644 --- a/tests/static_tests/functional/tuple_traits.cpp +++ b/tests/static_tests/functional/tuple_traits.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; using internal::check_if_tuple_has; diff --git a/tests/static_tests/functional/tuple_transform.cpp b/tests/static_tests/functional/tuple_transform.cpp index ad75f6455..d2f61788f 100644 --- a/tests/static_tests/functional/tuple_transform.cpp +++ b/tests/static_tests/functional/tuple_transform.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same using namespace sqlite_orm; diff --git a/tests/static_tests/is_bindable.cpp b/tests/static_tests/is_bindable.cpp index 1bd3fde44..d9d054e97 100644 --- a/tests/static_tests/is_bindable.cpp +++ b/tests/static_tests/is_bindable.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::unique_ptr, std::shared_ptr #include // std::string #ifdef SQLITE_ORM_OPTIONAL_SUPPORTED diff --git a/tests/static_tests/is_column_with_insertable_primary_key.cpp b/tests/static_tests/is_column_with_insertable_primary_key.cpp index 24ee04392..4be302d29 100644 --- a/tests/static_tests/is_column_with_insertable_primary_key.cpp +++ b/tests/static_tests/is_column_with_insertable_primary_key.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; using namespace internal; diff --git a/tests/static_tests/is_primary_key_insertable.cpp b/tests/static_tests/is_primary_key_insertable.cpp index 4d5143a54..274b0a4c8 100644 --- a/tests/static_tests/is_primary_key_insertable.cpp +++ b/tests/static_tests/is_primary_key_insertable.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::std::decay using namespace sqlite_orm; diff --git a/tests/static_tests/is_printable.cpp b/tests/static_tests/is_printable.cpp index 8b3a3d4e4..86d7ef9a4 100644 --- a/tests/static_tests/is_printable.cpp +++ b/tests/static_tests/is_printable.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::unique_ptr, std::shared_ptr #include // std::string #ifdef SQLITE_ORM_OPTIONAL_SUPPORTED diff --git a/tests/static_tests/iterator_t.cpp b/tests/static_tests/iterator_t.cpp index 496e9aff3..39c424dc4 100644 --- a/tests/static_tests/iterator_t.cpp +++ b/tests/static_tests/iterator_t.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include using namespace sqlite_orm; diff --git a/tests/static_tests/member_traits_tests.cpp b/tests/static_tests/member_traits_tests.cpp index 2e24a31fb..be1ed63f2 100644 --- a/tests/static_tests/member_traits_tests.cpp +++ b/tests/static_tests/member_traits_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/static_tests/node_tuple.cpp b/tests/static_tests/node_tuple.cpp index c0dca0a4b..7b4fadfe9 100644 --- a/tests/static_tests/node_tuple.cpp +++ b/tests/static_tests/node_tuple.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::is_same using namespace sqlite_orm; diff --git a/tests/static_tests/select_return_type.cpp b/tests/static_tests/select_return_type.cpp index decbf5683..86d40e5c9 100644 --- a/tests/static_tests/select_return_type.cpp +++ b/tests/static_tests/select_return_type.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "static_tests_common.h" #include "static_tests_storage_traits.h" diff --git a/tests/storage_non_crud_tests.cpp b/tests/storage_non_crud_tests.cpp index 30b412fae..aab36cd62 100644 --- a/tests/storage_non_crud_tests.cpp +++ b/tests/storage_non_crud_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; @@ -498,7 +498,7 @@ TEST_CASE("Remove all") { } TEST_CASE("Explicit insert") { - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; struct User { int id; @@ -587,7 +587,7 @@ TEST_CASE("Explicit insert") { SECTION("one column") { User user4; user4.name = "Egor"; - REQUIRE_THROWS_WITH(storage.insert(user4, columns(&User::name)), Contains("NOT NULL constraint failed")); + REQUIRE_THROWS_WITH(storage.insert(user4, columns(&User::name)), ContainsSubstring("NOT NULL constraint failed")); } } SECTION("visit") { @@ -620,7 +620,7 @@ TEST_CASE("Explicit insert") { visit3.setId(10); SECTION("getter") { REQUIRE_THROWS_WITH(storage.insert(visit3, columns(&Visit::id)), - Contains("NOT NULL constraint failed")); + ContainsSubstring("NOT NULL constraint failed")); } } } diff --git a/tests/storage_tests.cpp b/tests/storage_tests.cpp index eb4c319af..e1feeb49b 100644 --- a/tests/storage_tests.cpp +++ b/tests/storage_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/sync_schema_tests.cpp b/tests/sync_schema_tests.cpp index b89ad5292..7ec68d229 100644 --- a/tests/sync_schema_tests.cpp +++ b/tests/sync_schema_tests.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include using namespace sqlite_orm; diff --git a/tests/table_tests.cpp b/tests/table_tests.cpp index d9e9dc39e..d36e5e8dc 100644 --- a/tests/table_tests.cpp +++ b/tests/table_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/tests.cpp b/tests/tests.cpp index b53f84262..d0e13dc57 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -1,8 +1,5 @@ #include - -#define CATCH_CONFIG_MAIN - -#include +#include #include // std::vector #include // std::string @@ -107,7 +104,7 @@ TEST_CASE("Limits") { } TEST_CASE("Custom collate") { - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; struct Item { int id; @@ -193,11 +190,11 @@ TEST_CASE("Custom collate") { storage.delete_collation(); } REQUIRE_THROWS_WITH(storage.select(&Item::name, where(is_equal(&Item::name, "Mercury").collate("ototo"))), - Contains("no such collation sequence")); + ContainsSubstring("no such collation sequence")); REQUIRE_THROWS_WITH(storage.select(&Item::name, where(is_equal(&Item::name, "Mercury").collate())), - Contains("no such collation sequence")); + ContainsSubstring("no such collation sequence")); REQUIRE_THROWS_WITH(storage.select(&Item::name, where(is_equal(&Item::name, "Mercury").collate("ototo2"))), - Contains("no such collation sequence")); + ContainsSubstring("no such collation sequence")); rows = storage.select(&Item::name, where(is_equal(&Item::name, "Mercury").collate("alwaysequal")), diff --git a/tests/tests2.cpp b/tests/tests2.cpp index 59e83f44b..2ae6a1ece 100644 --- a/tests/tests2.cpp +++ b/tests/tests2.cpp @@ -1,5 +1,5 @@ #include -#include +#include #ifdef SQLITE_ORM_OPTIONAL_SUPPORTED #include // std::optional #endif // SQLITE_ORM_OPTIONAL_SUPPORTED @@ -357,7 +357,7 @@ int FirstFunction::objectsCount = 0; int FirstFunction::callsCount = 0; TEST_CASE("custom functions") { - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; SqrtFunction::callsCount = 0; HasPrefixFunction::callsCount = 0; @@ -382,7 +382,7 @@ TEST_CASE("custom functions") { auto storage = make_storage(path, make_table("users", make_column("id", &User::id))); storage.sync_schema(); // call before creation - REQUIRE_THROWS_WITH(storage.select(func(4)), Contains("no such function")); + REQUIRE_THROWS_WITH(storage.select(func(4)), ContainsSubstring("no such function")); // create function REQUIRE(SqrtFunction::callsCount == 0); diff --git a/tests/tests3.cpp b/tests/tests3.cpp index 3d8aa2295..2f945fa69 100644 --- a/tests/tests3.cpp +++ b/tests/tests3.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/tests4.cpp b/tests/tests4.cpp index 1da0b924a..9a72a9f7e 100644 --- a/tests/tests4.cpp +++ b/tests/tests4.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::count_if #ifdef SQLITE_ORM_OPTIONAL_SUPPORTED #include // std::optional diff --git a/tests/tests5.cpp b/tests/tests5.cpp index 79da9bba0..fc683d186 100644 --- a/tests/tests5.cpp +++ b/tests/tests5.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::iota using namespace sqlite_orm; diff --git a/tests/transaction_tests.cpp b/tests/transaction_tests.cpp index 905288f5a..adf9792f8 100644 --- a/tests/transaction_tests.cpp +++ b/tests/transaction_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; @@ -189,7 +189,7 @@ TEST_CASE("Transaction guard") { REQUIRE(storage.count() == countBefore); } SECTION("exception propagated from dtor") { - using namespace Catch::Matchers; + using Catch::Matchers::ContainsSubstring; // create a second database connection auto storage2 = make_storage("guard.sqlite", table); @@ -200,7 +200,7 @@ TEST_CASE("Transaction guard") { auto guard = new(&buffer) internal::transaction_guard_t{storage.transaction_guard()}; storage.insert({}); guard->commit_on_destroy = true; - REQUIRE_THROWS_WITH(guard->~transaction_guard_t(), Contains("database is locked")); + REQUIRE_THROWS_WITH(guard->~transaction_guard_t(), ContainsSubstring("database is locked")); } ::remove("guard.sqlite"); } diff --git a/tests/trigger_tests.cpp b/tests/trigger_tests.cpp index 9a4866ceb..36d6a7de3 100644 --- a/tests/trigger_tests.cpp +++ b/tests/trigger_tests.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/tuple_iteration.cpp b/tests/tuple_iteration.cpp index aa8be2866..95d916250 100644 --- a/tests/tuple_iteration.cpp +++ b/tests/tuple_iteration.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include // std::type_index #include // std::string #include // std::remove_pointer diff --git a/tests/unique_cases/delete_with_two_fields.cpp b/tests/unique_cases/delete_with_two_fields.cpp index 0d91fc9ce..558bd3e17 100644 --- a/tests/unique_cases/delete_with_two_fields.cpp +++ b/tests/unique_cases/delete_with_two_fields.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/unique_cases/get_all_with_two_tables.cpp b/tests/unique_cases/get_all_with_two_tables.cpp index bdda88172..f0eb715f3 100644 --- a/tests/unique_cases/get_all_with_two_tables.cpp +++ b/tests/unique_cases/get_all_with_two_tables.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/unique_cases/index_named_table_with_fk.cpp b/tests/unique_cases/index_named_table_with_fk.cpp index 3ebd8183e..7d3b18edb 100644 --- a/tests/unique_cases/index_named_table_with_fk.cpp +++ b/tests/unique_cases/index_named_table_with_fk.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/unique_cases/issue525.cpp b/tests/unique_cases/issue525.cpp index 62f7ae8c8..1b71e02b7 100644 --- a/tests/unique_cases/issue525.cpp +++ b/tests/unique_cases/issue525.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/unique_cases/issue663.cpp b/tests/unique_cases/issue663.cpp index 565251893..b4ab6135d 100644 --- a/tests/unique_cases/issue663.cpp +++ b/tests/unique_cases/issue663.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/unique_cases/issue86.cpp b/tests/unique_cases/issue86.cpp index e4ad92b14..ddae77874 100644 --- a/tests/unique_cases/issue86.cpp +++ b/tests/unique_cases/issue86.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/unique_cases/issue937.cpp b/tests/unique_cases/issue937.cpp index ed1dc3cf4..51ece11b5 100644 --- a/tests/unique_cases/issue937.cpp +++ b/tests/unique_cases/issue937.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; #ifdef SQLITE_ORM_OPTIONAL_SUPPORTED diff --git a/tests/unique_cases/join_iterator_ctor_compilation_error.cpp b/tests/unique_cases/join_iterator_ctor_compilation_error.cpp index cbbb947e0..03d4e02b5 100644 --- a/tests/unique_cases/join_iterator_ctor_compilation_error.cpp +++ b/tests/unique_cases/join_iterator_ctor_compilation_error.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm; diff --git a/tests/unique_cases/prepare_get_all_with_case.cpp b/tests/unique_cases/prepare_get_all_with_case.cpp index 034fe4f32..1633a0f5d 100644 --- a/tests/unique_cases/prepare_get_all_with_case.cpp +++ b/tests/unique_cases/prepare_get_all_with_case.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace sqlite_orm;