From b8e8ab76ff40190b996a097aad2a09fb58fc20f0 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Thu, 23 May 2024 18:12:07 +0300 Subject: [PATCH 01/17] add new tests --- src/tests/rpp/test_buffer.cpp | 24 +++--- src/tests/rpp/test_combine_latest.cpp | 120 +++++++++++--------------- src/tests/rpp/test_map.cpp | 4 +- src/tests/utils/rpp_trompeloil.hpp | 8 +- 4 files changed, 70 insertions(+), 86 deletions(-) diff --git a/src/tests/rpp/test_buffer.cpp b/src/tests/rpp/test_buffer.cpp index 629388a49..1dcc0a128 100644 --- a/src/tests/rpp/test_buffer.cpp +++ b/src/tests/rpp/test_buffer.cpp @@ -29,18 +29,18 @@ TEST_CASE("buffer bundles items") auto obs = rpp::source::just(1, 2, 3); SECTION("buffer(0) - shall see -{1}-{2}-{3}-|") { - REQUIRE_CALL(*mock, on_next(std::vector{1})).IN_SEQUENCE(s); - REQUIRE_CALL(*mock, on_next(std::vector{2})).IN_SEQUENCE(s); - REQUIRE_CALL(*mock, on_next(std::vector{3})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{1})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{2})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{3})).IN_SEQUENCE(s); REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(s); obs | rpp::ops::buffer(0) | rpp::ops::subscribe(mock); } SECTION("buffer(1) - shall see -{1}-{2}-{3}-|") { - REQUIRE_CALL(*mock, on_next(std::vector{1})).IN_SEQUENCE(s); - REQUIRE_CALL(*mock, on_next(std::vector{2})).IN_SEQUENCE(s); - REQUIRE_CALL(*mock, on_next(std::vector{3})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{1})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{2})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{3})).IN_SEQUENCE(s); REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(s); obs | rpp::ops::buffer(1) @@ -48,8 +48,8 @@ TEST_CASE("buffer bundles items") } SECTION("buffer(2) - shall see -{1,2}-{3}|") { - REQUIRE_CALL(*mock, on_next(std::vector{1, 2})).IN_SEQUENCE(s); - REQUIRE_CALL(*mock, on_next(std::vector{3})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{1, 2})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{3})).IN_SEQUENCE(s); REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(s); obs | rpp::ops::buffer(2) @@ -57,7 +57,7 @@ TEST_CASE("buffer bundles items") } SECTION("buffer(3) - shall see -{1,2,3}-|") { - REQUIRE_CALL(*mock, on_next(std::vector{1, 2, 3})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{1, 2, 3})).IN_SEQUENCE(s); REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(s); obs | rpp::ops::buffer(3) @@ -65,7 +65,7 @@ TEST_CASE("buffer bundles items") } SECTION("buffer(4) - shall see -{1,2,3}-|") { - REQUIRE_CALL(*mock, on_next(std::vector{1, 2, 3})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{1, 2, 3})).IN_SEQUENCE(s); REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(s); obs | rpp::ops::buffer(4) @@ -81,7 +81,7 @@ TEST_CASE("buffer bundles items") | rpp::ops::merge(); SECTION("buffer(0) - shall see -{1}-x, which means error event is through") { - REQUIRE_CALL(*mock, on_next(std::vector{1})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{1})).IN_SEQUENCE(s); REQUIRE_CALL(*mock, on_error(trompeloeil::_)).IN_SEQUENCE(s); obs | rpp::ops::buffer(0) @@ -89,7 +89,7 @@ TEST_CASE("buffer bundles items") } SECTION("buffer(1) - shall see -{1}-x, which means error event is through") { - REQUIRE_CALL(*mock, on_next(std::vector{1})).IN_SEQUENCE(s); + REQUIRE_CALL(*mock, on_next_rvalue(std::vector{1})).IN_SEQUENCE(s); REQUIRE_CALL(*mock, on_error(trompeloeil::_)).IN_SEQUENCE(s); obs | rpp::ops::buffer(1) diff --git a/src/tests/rpp/test_combine_latest.cpp b/src/tests/rpp/test_combine_latest.cpp index 42c7b73d0..d08e4f3da 100644 --- a/src/tests/rpp/test_combine_latest.cpp +++ b/src/tests/rpp/test_combine_latest.cpp @@ -10,7 +10,6 @@ #include -#include #include #include #include @@ -22,29 +21,37 @@ #include #include "disposable_observable.hpp" +#include "rpp_trompeloil.hpp" #include "snitch_logging.hpp" TEST_CASE("combine_latest bundles items") { SECTION("observable of -1-2-3-| combines with -4-5-6-| on immediate scheduler") { - auto mock = mock_observer_strategy>{}; + auto mock = mock_observer>{}; + trompeloeil::sequence seq; + + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 6))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(2, 6))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(3, 6))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(seq); + rpp::source::just(rpp::schedulers::immediate{}, 1, 2, 3) | rpp::ops::combine_latest(rpp::source::just(rpp::schedulers::immediate{}, 4, 5, 6)) | rpp::ops::subscribe(mock); - - CHECK(mock.get_received_values() == std::vector>{ - std::make_tuple(1, 6), - std::make_tuple(2, 6), - std::make_tuple(3, 6), - }); - CHECK(mock.get_on_completed_count() == 1); - CHECK(mock.get_on_error_count() == 0); } SECTION("observable of -1-2-3-| combines with -4-5-6-| on current_thread") { - auto mock = mock_observer_strategy>{}; + auto mock = mock_observer>{}; + trompeloeil::sequence seq; + + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 4))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 5))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(2, 5))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(2, 6))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(3, 6))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(seq); rpp::source::just(rpp::schedulers::current_thread{}, 1, 2, 3) // source 1 | rpp::ops::combine_latest(rpp::source::just(rpp::schedulers::current_thread{}, 4, 5, 6)) // source 2 @@ -53,21 +60,21 @@ TEST_CASE("combine_latest bundles items") // Above stream should output in such sequence // source 1: -1---2---3-| // source 2: -4---5---6-| - - CHECK(mock.get_received_values() == std::vector>{ - std::make_tuple(1, 4), - std::make_tuple(1, 5), - std::make_tuple(2, 5), - std::make_tuple(2, 6), - std::make_tuple(3, 6), - }); - CHECK(mock.get_on_completed_count() == 1); - CHECK(mock.get_on_error_count() == 0); } SECTION("observable of -1-2-3-| combines with two other sources on current_thread") { - auto mock = mock_observer_strategy>{}; + auto mock = mock_observer>{}; + trompeloeil::sequence seq; + + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 4, 7))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 5, 7))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 5, 8))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(2, 5, 8))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(2, 6, 8))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(2, 6, 9))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(3, 6, 9))).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(seq); rpp::source::just(rpp::schedulers::current_thread{}, 1, 2, 3) // source 1 | rpp::ops::combine_latest( @@ -79,18 +86,6 @@ TEST_CASE("combine_latest bundles items") // source 1: --1---2---3-| // source 2: -4---5---6-| // source 3: --7---8---9-| - - CHECK(mock.get_received_values() == std::vector>{ - std::make_tuple(1, 4, 7), - std::make_tuple(1, 5, 7), - std::make_tuple(1, 5, 8), - std::make_tuple(2, 5, 8), - std::make_tuple(2, 6, 8), - std::make_tuple(2, 6, 9), - std::make_tuple(3, 6, 9), - }); - CHECK(mock.get_on_completed_count() == 1); - CHECK(mock.get_on_error_count() == 0); } } @@ -98,14 +93,11 @@ TEST_CASE("combine_latest defers completed event") { SECTION("observable of -1-2-3-| and never") { - auto mock = mock_observer_strategy>{}; + auto mock = mock_observer>{}; + rpp::source::just(1, 2, 3) | rpp::ops::combine_latest(rpp::source::never()) | rpp::ops::subscribe(mock); - - CHECK(mock.get_received_values().empty()); - CHECK(mock.get_on_completed_count() == 0); - CHECK(mock.get_on_error_count() == 0); } } @@ -113,44 +105,36 @@ TEST_CASE("combine_latest forwards errors") { SECTION("observable of -1-2-3-| combines with error") { - auto mock = mock_observer_strategy>{}; + auto mock = mock_observer>{}; + REQUIRE_CALL(*mock, on_error(trompeloeil::_)); rpp::source::just(1, 2, 3) | rpp::ops::combine_latest(rpp::source::error(std::make_exception_ptr(std::runtime_error{""}))) | rpp::ops::subscribe(mock); - - CHECK(mock.get_received_values().empty()); - CHECK(mock.get_on_completed_count() == 0); - CHECK(mock.get_on_error_count() == 1); } } TEST_CASE("combine_latest handles race condition") { - SECTION("source observable in current thread pairs with error in other thread") + SECTION("suscribe on source observable in current thread pairs with error in other thread - on_error can't interleave with on_next") { - std::atomic_bool on_error_called{false}; - auto subject = rpp::subjects::publish_subject{}; - - SECTION("subscribe on it") - { - SECTION("on_error can't interleave with on_next") - { - rpp::source::just(1, 1, 1) - | rpp::ops::combine_latest(rpp::source::concat(rpp::source::just(2), subject.get_observable())) - | rpp::ops::as_blocking() - | rpp::ops::subscribe([&](auto&&) { - CHECK(!on_error_called); - std::thread{[&] - { - subject.get_observer().on_error(std::exception_ptr{}); - }}.detach(); - std::this_thread::sleep_for(std::chrono::seconds{1}); - CHECK(!on_error_called); }, - [&](auto) { on_error_called = true; }); - - CHECK(on_error_called); - } - } + auto subject = rpp::subjects::publish_subject{}; + auto mock = mock_observer>{}; + trompeloeil::sequence s{}; + + REQUIRE_CALL(*mock, on_next_rvalue(trompeloeil::_)) + .IN_SEQUENCE(s) + .LR_SIDE_EFFECT({ + std::thread{[&] { + subject.get_observer().on_error(std::exception_ptr{}); + }}.detach(); + std::this_thread::sleep_for(std::chrono::seconds{1}); + }); + REQUIRE_CALL(*mock, on_error(trompeloeil::_)).IN_SEQUENCE(s); + + rpp::source::just(1, 1, 1) + | rpp::ops::combine_latest(rpp::source::concat(rpp::source::just(2), subject.get_observable())) + | rpp::ops::as_blocking() + | rpp::ops::subscribe(mock); } } diff --git a/src/tests/rpp/test_map.cpp b/src/tests/rpp/test_map.cpp index 12a469a48..9fc4d8581 100644 --- a/src/tests/rpp/test_map.cpp +++ b/src/tests/rpp/test_map.cpp @@ -29,8 +29,8 @@ TEMPLATE_TEST_CASE("map modifies values and forward errors/completions", "", rpp mock_observer mock{}; trompeloeil::sequence seq; - REQUIRE_CALL(*mock, on_next("TEST 1")).IN_SEQUENCE(seq); - REQUIRE_CALL(*mock, on_next("TEST 2")).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue("TEST 1")).IN_SEQUENCE(seq); + REQUIRE_CALL(*mock, on_next_rvalue("TEST 2")).IN_SEQUENCE(seq); REQUIRE_CALL(*mock, on_completed()).IN_SEQUENCE(seq); obs | rpp::operators::map([](auto v) { return std::string("TEST ") + std::to_string(v); }) | rpp::operators::subscribe(std::move(mock)); diff --git a/src/tests/utils/rpp_trompeloil.hpp b/src/tests/utils/rpp_trompeloil.hpp index 6018c97c6..c0098eb46 100644 --- a/src/tests/utils/rpp_trompeloil.hpp +++ b/src/tests/utils/rpp_trompeloil.hpp @@ -42,8 +42,8 @@ class mock_observer { impl_t() = default; - MAKE_MOCK1(on_next, void(const T&), const); - MAKE_MOCK1(on_next, void(T&&), const); + MAKE_MOCK1(on_next_lvalue, void(const T&), const); + MAKE_MOCK1(on_next_rvalue, void(T&&), const); MAKE_MOCK1(on_error, void(const std::exception_ptr& err), const); MAKE_MOCK0(on_completed, void(), const); }; @@ -52,12 +52,12 @@ class mock_observer void on_next(const T& v) const noexcept { - impl->on_next(v); + impl->on_next_lvalue(v); } void on_next(T&& v) const noexcept { - impl->on_next(std::move(v)); + impl->on_next_rvalue(std::move(v)); } void on_error(const std::exception_ptr& err) const noexcept { impl->on_error(err); } From a37bd3372e35bc18abbabbb732e2b25c51f55896 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Thu, 23 May 2024 18:46:58 +0300 Subject: [PATCH 02/17] move back to catch2 --- .clang-format | 2 +- CMakeLists.txt | 4 +- Readme.md | 2 +- cmake/dependencies.cmake | 4 +- conanfile.py | 2 +- sonar-project.properties | 2 +- src/tests/CMakeLists.txt | 3 +- src/tests/rpp/test_buffer.cpp | 3 +- src/tests/rpp/test_combine_latest.cpp | 9 ++-- src/tests/rpp/test_concat.cpp | 6 +-- src/tests/rpp/test_connectable_observable.cpp | 3 +- src/tests/rpp/test_debounce.cpp | 3 +- src/tests/rpp/test_defer.cpp | 3 +- src/tests/rpp/test_delay.cpp | 4 +- src/tests/rpp/test_disposables.cpp | 3 +- src/tests/rpp/test_distinct.cpp | 3 +- src/tests/rpp/test_distinct_until_changed.cpp | 3 +- src/tests/rpp/test_filter.cpp | 3 +- src/tests/rpp/test_finally.cpp | 5 ++- src/tests/rpp/test_first.cpp | 3 +- src/tests/rpp/test_flat_map.cpp | 4 +- src/tests/rpp/test_from.cpp | 19 ++++---- src/tests/rpp/test_group_by.cpp | 3 +- src/tests/rpp/test_interval.cpp | 4 +- src/tests/rpp/test_last.cpp | 3 +- src/tests/rpp/test_map.cpp | 3 +- src/tests/rpp/test_merge.cpp | 6 +-- src/tests/rpp/test_observables.cpp | 21 ++++----- src/tests/rpp/test_observers.cpp | 3 +- src/tests/rpp/test_on_error_resume_next.cpp | 5 ++- src/tests/rpp/test_reduce.cpp | 3 +- src/tests/rpp/test_repeat.cpp | 3 +- src/tests/rpp/test_scan.cpp | 3 +- src/tests/rpp/test_scheduler.cpp | 3 +- src/tests/rpp/test_skip.cpp | 11 ++--- src/tests/rpp/test_start_with.cpp | 3 +- src/tests/rpp/test_subjects.cpp | 4 +- src/tests/rpp/test_subscribe.cpp | 3 +- src/tests/rpp/test_subscribe_on.cpp | 3 +- src/tests/rpp/test_switch_on_next.cpp | 4 +- src/tests/rpp/test_take.cpp | 3 +- src/tests/rpp/test_take_last.cpp | 3 +- src/tests/rpp/test_take_until.cpp | 3 +- src/tests/rpp/test_take_while.cpp | 3 +- src/tests/rpp/test_tap.cpp | 3 +- src/tests/rpp/test_throttle.cpp | 4 +- src/tests/rpp/test_timeout.cpp | 4 +- src/tests/rpp/test_timer.cpp | 3 +- src/tests/rpp/test_window.cpp | 4 +- src/tests/rpp/test_window_toggle.cpp | 4 +- src/tests/rpp/test_with_latest_from.cpp | 5 ++- src/tests/rpp/test_zip.cpp | 5 ++- src/tests/rppqt/test_from_signal.cpp | 3 +- .../rppqt/test_main_thread_scheduler.cpp | 3 +- src/tests/utils/copy_count_tracker.hpp | 3 +- src/tests/utils/disposable_observable.hpp | 3 +- src/tests/utils/rpp_trompeloil.hpp | 6 +-- src/tests/utils/snitch_logging.hpp | 44 ------------------- 58 files changed, 140 insertions(+), 147 deletions(-) delete mode 100644 src/tests/utils/snitch_logging.hpp diff --git a/.clang-format b/.clang-format index 892d60add..b246583c7 100644 --- a/.clang-format +++ b/.clang-format @@ -68,7 +68,7 @@ RequiresExpressionIndentation: OuterScope FixNamespaceComments: true IncludeBlocks: Regroup IncludeCategories: - - Regex: '^<(snitch|nanobench).*>' + - Regex: '^<(catch|nanobench).*>' Priority: 1 SortPriority: 1 - Regex: '^' diff --git a/CMakeLists.txt b/CMakeLists.txt index 31af85e01..5dbec6c2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,9 +52,9 @@ if (RPP_BUILD_TESTS OR RPP_BUILD_BENCHMARKS) macro(add_test_with_coverage TARGET) if (RPP_USE_LLVM_COV) - add_test(NAME ${TARGET} COMMAND ${CMAKE_COMMAND} -E env LLVM_PROFILE_FILE=${RPP_TEST_RESULTS_DIR}/${TARGET}.profraw $ -v full) + add_test(NAME ${TARGET} COMMAND ${CMAKE_COMMAND} -E env LLVM_PROFILE_FILE=${RPP_TEST_RESULTS_DIR}/${TARGET}.profraw $ -v high) else() - add_test(NAME ${TARGET} COMMAND $ -v full) + add_test(NAME ${TARGET} COMMAND $ -v high) endif() endmacro() endif() diff --git a/Readme.md b/Readme.md index f1a3866df..be289269b 100644 --- a/Readme.md +++ b/Readme.md @@ -182,7 +182,7 @@ DEALINGS IN THE SOFTWARE. # Credits: ReactivePlusPlus library uses: - [PVS-Studio](https://pvs-studio.com/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code. -- [snitch](https://github.com/cschreib/snitch) for unit testing only, fetched automatically in case of `RPP_BUILD_TESTS` enabled +- [catch](https://github.com/catchorg/Catch2) for unit testing only, fetched automatically in case of `RPP_BUILD_TESTS` enabled - [trompeloeil](https://github.com/rollbear/trompeloeil) for mocking in unit testing only, fetched automatically in case of `RPP_BUILD_TESTS` enabled - [nanobench](https://github.com/martinus/nanobench) for benchmarking only, fetched automatically in case of `RPP_BUILD_BENCHMARKS` enabled - [RxCpp](https://github.com/ReactiveX/RxCpp) only for comparison of performance between RPP and RxCpp in CI benchmarks. Used as cmake dependency under option diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 7a9bdfa03..0fd864d1d 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -71,9 +71,9 @@ if (RPP_BUILD_RXCPP AND RPP_BUILD_BENCHMARKS) rpp_fetch_library(rxcpp https://github.com/ReactiveX/RxCpp.git origin/main) endif() -# ===================== Snitch =================== +# ===================== Tests =================== if (RPP_BUILD_TESTS) - rpp_fetch_library(snitch https://github.com/cschreib/snitch.git main) + rpp_fetch_library_extended(catch2 https://github.com/catchorg/Catch2.git v3.6.0 Catch2WithMain) rpp_fetch_library(trompeloeil https://github.com/rollbear/trompeloeil.git main) endif() diff --git a/conanfile.py b/conanfile.py index bc7892cd9..8303541d1 100644 --- a/conanfile.py +++ b/conanfile.py @@ -23,7 +23,7 @@ class RppConan(ConanFile): def requirements(self): if self.options.with_tests: self.requires("trompeloeil/47") - self.requires("snitch/1.2.3") + self.requires("catch2/3.6.0") if self.options.with_benchmarks: self.requires("nanobench/4.3.11") diff --git a/sonar-project.properties b/sonar-project.properties index 643d5cd75..9df2d58bc 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -8,4 +8,4 @@ sonar.cfamily.llvm-cov.reportPath=build/test_results/coverage.txt sonar.coverage.exclusions=src/tests/**/* sonar.cpd.exclusions=src/tests/**/* sonar.issue.ignore.allfile=a1 -sonar.issue.ignore.allfile.a1.fileRegexp=#include.*snitch +sonar.issue.ignore.allfile.a1.fileRegexp=#include.*catch diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 71ae46e80..fcd7e5c12 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -14,7 +14,8 @@ macro(add_test_target target_name module files) set(TARGET ${target_name}) add_executable(${TARGET} ${files}) - target_link_libraries(${TARGET} PRIVATE snitch::snitch trompeloeil::trompeloeil rpp_tests_utils ${module}) + target_link_libraries(${TARGET} PRIVATE Catch2WithMain trompeloeil::trompeloeil rpp_tests_utils ${module}) + target_compile_definitions(${TARGET} PRIVATE "CATCH_CONFIG_FAST_COMPILE") set_target_properties(${TARGET} PROPERTIES FOLDER Tests/Suites/${module}) add_test_with_coverage(${TARGET}) diff --git a/src/tests/rpp/test_buffer.cpp b/src/tests/rpp/test_buffer.cpp index 1dcc0a128..23855b5a1 100644 --- a/src/tests/rpp/test_buffer.cpp +++ b/src/tests/rpp/test_buffer.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_combine_latest.cpp b/src/tests/rpp/test_combine_latest.cpp index d08e4f3da..7445c8915 100644 --- a/src/tests/rpp/test_combine_latest.cpp +++ b/src/tests/rpp/test_combine_latest.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -22,7 +23,6 @@ #include "disposable_observable.hpp" #include "rpp_trompeloil.hpp" -#include "snitch_logging.hpp" TEST_CASE("combine_latest bundles items") { @@ -122,9 +122,10 @@ TEST_CASE("combine_latest handles race condition") trompeloeil::sequence s{}; REQUIRE_CALL(*mock, on_next_rvalue(trompeloeil::_)) + .TIMES(AT_LEAST(1)) .IN_SEQUENCE(s) .LR_SIDE_EFFECT({ - std::thread{[&] { + std::thread{[subject] { subject.get_observer().on_error(std::exception_ptr{}); }}.detach(); std::this_thread::sleep_for(std::chrono::seconds{1}); @@ -149,5 +150,5 @@ TEST_CASE("combine_latest satisfies disposable contracts") test_operator_finish_before_dispose(op); } - CHECK(observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2); + CHECK((observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2)); } diff --git a/src/tests/rpp/test_concat.cpp b/src/tests/rpp/test_concat.cpp index b362a0b51..030f90343 100644 --- a/src/tests/rpp/test_concat.cpp +++ b/src/tests/rpp/test_concat.cpp @@ -8,9 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include -#include -#include +#include +#include #include #include @@ -25,7 +24,6 @@ #include "copy_count_tracker.hpp" #include "disposable_observable.hpp" -#include "snitch_logging.hpp" #include #include diff --git a/src/tests/rpp/test_connectable_observable.cpp b/src/tests/rpp/test_connectable_observable.cpp index c330287f7..0b63123a5 100644 --- a/src/tests/rpp/test_connectable_observable.cpp +++ b/src/tests/rpp/test_connectable_observable.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_debounce.cpp b/src/tests/rpp/test_debounce.cpp index 39ff61f89..87b31e819 100644 --- a/src/tests/rpp/test_debounce.cpp +++ b/src/tests/rpp/test_debounce.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_defer.cpp b/src/tests/rpp/test_defer.cpp index 34e73738b..67200856a 100644 --- a/src/tests/rpp/test_defer.cpp +++ b/src/tests/rpp/test_defer.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_delay.cpp b/src/tests/rpp/test_delay.cpp index b7dcf3069..0d93051e0 100644 --- a/src/tests/rpp/test_delay.cpp +++ b/src/tests/rpp/test_delay.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -21,7 +22,6 @@ #include #include "disposable_observable.hpp" -#include "snitch_logging.hpp" namespace { diff --git a/src/tests/rpp/test_disposables.cpp b/src/tests/rpp/test_disposables.cpp index 665449389..8e1584a94 100644 --- a/src/tests/rpp/test_disposables.cpp +++ b/src/tests/rpp/test_disposables.cpp @@ -7,7 +7,8 @@ // // Project home: https://github.com/victimsnino/ReactivePlusPlus -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_distinct.cpp b/src/tests/rpp/test_distinct.cpp index 560f56893..15ef32a5a 100644 --- a/src/tests/rpp/test_distinct.cpp +++ b/src/tests/rpp/test_distinct.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_distinct_until_changed.cpp b/src/tests/rpp/test_distinct_until_changed.cpp index c7df6c7e6..b4a35455d 100644 --- a/src/tests/rpp/test_distinct_until_changed.cpp +++ b/src/tests/rpp/test_distinct_until_changed.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_filter.cpp b/src/tests/rpp/test_filter.cpp index ce98ffee5..dd4621ed6 100644 --- a/src/tests/rpp/test_filter.cpp +++ b/src/tests/rpp/test_filter.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_finally.cpp b/src/tests/rpp/test_finally.cpp index 552940215..a711a1678 100644 --- a/src/tests/rpp/test_finally.cpp +++ b/src/tests/rpp/test_finally.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -111,5 +112,5 @@ TEST_CASE("finally satisfies disposable contracts") rpp::ops::finally([]() noexcept {})); } - CHECK(observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2); + CHECK((observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2)); } diff --git a/src/tests/rpp/test_first.cpp b/src/tests/rpp/test_first.cpp index a7de00bd1..a35c3b6ad 100644 --- a/src/tests/rpp/test_first.cpp +++ b/src/tests/rpp/test_first.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_flat_map.cpp b/src/tests/rpp/test_flat_map.cpp index aff4b2deb..d0613452f 100644 --- a/src/tests/rpp/test_flat_map.cpp +++ b/src/tests/rpp/test_flat_map.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_from.cpp b/src/tests/rpp/test_from.cpp index d04b3704e..198b28941 100644 --- a/src/tests/rpp/test_from.cpp +++ b/src/tests/rpp/test_from.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -56,10 +57,10 @@ struct infinite_container TEMPLATE_TEST_CASE("from iterable emit items from container", "", - std::pair, - std::pair, - std::pair, - std::pair) + (std::pair), + (std::pair), + (std::pair), + (std::pair)) { using memory_model = std::tuple_element_t<1, TestType>; using scheduler = std::tuple_element_t<0, TestType>; @@ -369,10 +370,10 @@ TEST_CASE("just") TEMPLATE_TEST_CASE("just variadic", "", - std::pair, - std::pair, - std::pair, - std::pair) + (std::pair), + (std::pair), + (std::pair), + (std::pair)) { using memory_model = std::tuple_element_t<1, TestType>; using scheduler = std::tuple_element_t<0, TestType>; diff --git a/src/tests/rpp/test_group_by.cpp b/src/tests/rpp/test_group_by.cpp index f78cee8ff..7f6832276 100644 --- a/src/tests/rpp/test_group_by.cpp +++ b/src/tests/rpp/test_group_by.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_interval.cpp b/src/tests/rpp/test_interval.cpp index 5b6ee2924..fe1552646 100644 --- a/src/tests/rpp/test_interval.cpp +++ b/src/tests/rpp/test_interval.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -20,7 +21,6 @@ #include #include -#include "snitch_logging.hpp" #include diff --git a/src/tests/rpp/test_last.cpp b/src/tests/rpp/test_last.cpp index 502b4df65..d533f281b 100644 --- a/src/tests/rpp/test_last.cpp +++ b/src/tests/rpp/test_last.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_map.cpp b/src/tests/rpp/test_map.cpp index 9fc4d8581..8164be9ee 100644 --- a/src/tests/rpp/test_map.cpp +++ b/src/tests/rpp/test_map.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_merge.cpp b/src/tests/rpp/test_merge.cpp index 55e8511a8..b8dc4bc7f 100644 --- a/src/tests/rpp/test_merge.cpp +++ b/src/tests/rpp/test_merge.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include -#include +#include +#include #include #include @@ -290,5 +290,5 @@ TEST_CASE("merge satisfies disposable contracts") test_operator_with_disposable(op); test_operator_finish_before_dispose(op); } - CHECK(observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2); + CHECK((observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2)); } diff --git a/src/tests/rpp/test_observables.cpp b/src/tests/rpp/test_observables.cpp index 349747ecb..543976d53 100644 --- a/src/tests/rpp/test_observables.cpp +++ b/src/tests/rpp/test_observables.cpp @@ -7,7 +7,8 @@ // // Project home: https://github.com/victimsnino/ReactivePlusPlus -#include +#include +#include #include #include @@ -203,7 +204,7 @@ TEST_CASE("base observables") } } -TEST_CASE("create observable works properly as observable") +TEST_CASE("pipe observable works properly as observable") { SECTION("using const& variant") { @@ -246,19 +247,19 @@ TEST_CASE("create observable works properly as observable") TEMPLATE_TEST_CASE( "observable has type traits defined", "", - rpp::empty_observable, - rpp::dynamic_observable, - rpp::blocking_observable>, - rpp::connectable_observable, rpp::subjects::replay_subject>, - rpp::grouped_observable>) + (rpp::empty_observable), + (rpp::dynamic_observable), + (rpp::blocking_observable>), + (rpp::connectable_observable, rpp::subjects::replay_subject>), + (rpp::grouped_observable>)) { SECTION("value_type defined") { - CONSTEVAL_CHECK(requires { typename TestType::value_type; }); - CONSTEVAL_CHECK(std::is_same_v); + CHECK(requires { typename TestType::value_type; }); + CHECK(std::is_same_v); } SECTION("strategy_type defined") { - CONSTEVAL_CHECK(requires { typename TestType::strategy_type; }); + CHECK(requires { typename TestType::strategy_type; }); } } diff --git a/src/tests/rpp/test_observers.cpp b/src/tests/rpp/test_observers.cpp index 082c55836..052803d29 100644 --- a/src/tests/rpp/test_observers.cpp +++ b/src/tests/rpp/test_observers.cpp @@ -7,7 +7,8 @@ // // Project home: https://github.com/victimsnino/ReactivePlusPlus -#include +#include +#include #include diff --git a/src/tests/rpp/test_on_error_resume_next.cpp b/src/tests/rpp/test_on_error_resume_next.cpp index b71fcc959..286c5a0c7 100644 --- a/src/tests/rpp/test_on_error_resume_next.cpp +++ b/src/tests/rpp/test_on_error_resume_next.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -174,5 +175,5 @@ TEST_CASE("on_error_resume_next satisfies disposable contracts") test_operator_finish_before_dispose(op); } - CHECK(observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2); + CHECK((observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2)); } diff --git a/src/tests/rpp/test_reduce.cpp b/src/tests/rpp/test_reduce.cpp index be7609552..2fd1839ff 100644 --- a/src/tests/rpp/test_reduce.cpp +++ b/src/tests/rpp/test_reduce.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_repeat.cpp b/src/tests/rpp/test_repeat.cpp index 44573c758..d5108814c 100644 --- a/src/tests/rpp/test_repeat.cpp +++ b/src/tests/rpp/test_repeat.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_scan.cpp b/src/tests/rpp/test_scan.cpp index 4c7ae77da..f05996183 100644 --- a/src/tests/rpp/test_scan.cpp +++ b/src/tests/rpp/test_scan.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_scheduler.cpp b/src/tests/rpp/test_scheduler.cpp index be184450b..47d350dd0 100644 --- a/src/tests/rpp/test_scheduler.cpp +++ b/src/tests/rpp/test_scheduler.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_skip.cpp b/src/tests/rpp/test_skip.cpp index 4d279d47e..be0890fe5 100644 --- a/src/tests/rpp/test_skip.cpp +++ b/src/tests/rpp/test_skip.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -24,10 +25,10 @@ TEMPLATE_TEST_CASE("skip ignores first `count` of items", "", - std::pair, - std::pair, - std::pair, - std::pair) + (std::pair), + (std::pair), + (std::pair), + (std::pair)) { using memory_model = std::tuple_element_t<1, TestType>; using scheduler = std::tuple_element_t<0, TestType>; diff --git a/src/tests/rpp/test_start_with.cpp b/src/tests/rpp/test_start_with.cpp index 58678a2a7..f0853645d 100644 --- a/src/tests/rpp/test_start_with.cpp +++ b/src/tests/rpp/test_start_with.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_subjects.cpp b/src/tests/rpp/test_subjects.cpp index a16fac72a..1fed1c85d 100644 --- a/src/tests/rpp/test_subjects.cpp +++ b/src/tests/rpp/test_subjects.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -19,7 +20,6 @@ #include #include "copy_count_tracker.hpp" -#include "snitch_logging.hpp" #include diff --git a/src/tests/rpp/test_subscribe.cpp b/src/tests/rpp/test_subscribe.cpp index e7735282d..569cc2e84 100644 --- a/src/tests/rpp/test_subscribe.cpp +++ b/src/tests/rpp/test_subscribe.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_subscribe_on.cpp b/src/tests/rpp/test_subscribe_on.cpp index 5cf0d02cd..fd37a065c 100644 --- a/src/tests/rpp/test_subscribe_on.cpp +++ b/src/tests/rpp/test_subscribe_on.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_switch_on_next.cpp b/src/tests/rpp/test_switch_on_next.cpp index a4c4e35d0..09855806c 100644 --- a/src/tests/rpp/test_switch_on_next.cpp +++ b/src/tests/rpp/test_switch_on_next.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -21,7 +22,6 @@ #include "copy_count_tracker.hpp" #include "disposable_observable.hpp" -#include "snitch_logging.hpp" TEST_CASE("switch_on_next switches observable after obtaining new one") { diff --git a/src/tests/rpp/test_take.cpp b/src/tests/rpp/test_take.cpp index 71eaa8c38..19fa01837 100644 --- a/src/tests/rpp/test_take.cpp +++ b/src/tests/rpp/test_take.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_take_last.cpp b/src/tests/rpp/test_take_last.cpp index fe2ae7eb8..c6006303c 100644 --- a/src/tests/rpp/test_take_last.cpp +++ b/src/tests/rpp/test_take_last.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_take_until.cpp b/src/tests/rpp/test_take_until.cpp index aa637524e..abca81337 100644 --- a/src/tests/rpp/test_take_until.cpp +++ b/src/tests/rpp/test_take_until.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_take_while.cpp b/src/tests/rpp/test_take_while.cpp index 6d8ac1bc0..cab8f5f94 100644 --- a/src/tests/rpp/test_take_while.cpp +++ b/src/tests/rpp/test_take_while.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_tap.cpp b/src/tests/rpp/test_tap.cpp index b2ac2020f..602ac506b 100644 --- a/src/tests/rpp/test_tap.cpp +++ b/src/tests/rpp/test_tap.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_throttle.cpp b/src/tests/rpp/test_throttle.cpp index f2b96df3e..2f7db0e26 100644 --- a/src/tests/rpp/test_throttle.cpp +++ b/src/tests/rpp/test_throttle.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -17,7 +18,6 @@ #include #include "disposable_observable.hpp" -#include "snitch_logging.hpp" TEST_CASE("throttle throttles emissions") { diff --git a/src/tests/rpp/test_timeout.cpp b/src/tests/rpp/test_timeout.cpp index 42abaa33d..820f04eef 100644 --- a/src/tests/rpp/test_timeout.cpp +++ b/src/tests/rpp/test_timeout.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -20,7 +21,6 @@ #include #include "disposable_observable.hpp" -#include "snitch_logging.hpp" TEST_CASE("timeout subscribes to passed observable in case of reaching timeout") diff --git a/src/tests/rpp/test_timer.cpp b/src/tests/rpp/test_timer.cpp index b54f7aeb1..01c29cfd1 100644 --- a/src/tests/rpp/test_timer.cpp +++ b/src/tests/rpp/test_timer.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include diff --git a/src/tests/rpp/test_window.cpp b/src/tests/rpp/test_window.cpp index a0b31124b..3759842d3 100644 --- a/src/tests/rpp/test_window.cpp +++ b/src/tests/rpp/test_window.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -17,7 +18,6 @@ #include #include "disposable_observable.hpp" -#include "snitch_logging.hpp" TEST_CASE("window subdivide observable into sub-observables") { diff --git a/src/tests/rpp/test_window_toggle.cpp b/src/tests/rpp/test_window_toggle.cpp index 87b58036d..6d2512ad3 100644 --- a/src/tests/rpp/test_window_toggle.cpp +++ b/src/tests/rpp/test_window_toggle.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -19,7 +20,6 @@ #include "disposable_observable.hpp" #include "rpp/schedulers/immediate.hpp" -#include "snitch_logging.hpp" TEST_CASE("window_toggle") diff --git a/src/tests/rpp/test_with_latest_from.cpp b/src/tests/rpp/test_with_latest_from.cpp index 44a4a8133..bd09c78f9 100644 --- a/src/tests/rpp/test_with_latest_from.cpp +++ b/src/tests/rpp/test_with_latest_from.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -204,5 +205,5 @@ TEST_CASE("with_latest_from satisfies disposable contracts") test_operator_finish_before_dispose(op); } - CHECK(observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2); + CHECK((observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2)); } diff --git a/src/tests/rpp/test_zip.cpp b/src/tests/rpp/test_zip.cpp index 206db4c79..b02e17d59 100644 --- a/src/tests/rpp/test_zip.cpp +++ b/src/tests/rpp/test_zip.cpp @@ -8,7 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include +#include +#include #include #include @@ -186,5 +187,5 @@ TEST_CASE("zip satisfies disposable contracts") test_operator_finish_before_dispose(op); } - CHECK(observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2); + CHECK((observable_disposable.is_disposed() || observable_disposable.lock().use_count() == 2)); } diff --git a/src/tests/rppqt/test_from_signal.cpp b/src/tests/rppqt/test_from_signal.cpp index 04242cd48..c5b9ed21d 100644 --- a/src/tests/rppqt/test_from_signal.cpp +++ b/src/tests/rppqt/test_from_signal.cpp @@ -38,7 +38,8 @@ struct TestQObject : public QObject void NoValueSignal(); }; -#include +#include +#include #include diff --git a/src/tests/rppqt/test_main_thread_scheduler.cpp b/src/tests/rppqt/test_main_thread_scheduler.cpp index 393a765d9..96818b173 100644 --- a/src/tests/rppqt/test_main_thread_scheduler.cpp +++ b/src/tests/rppqt/test_main_thread_scheduler.cpp @@ -7,7 +7,8 @@ // // Project home: https://github.com/victimsnino/ReactivePlusPlus -#include +#include +#include #include #include diff --git a/src/tests/utils/copy_count_tracker.hpp b/src/tests/utils/copy_count_tracker.hpp index 77810a148..36f303dbb 100644 --- a/src/tests/utils/copy_count_tracker.hpp +++ b/src/tests/utils/copy_count_tracker.hpp @@ -10,7 +10,8 @@ #pragma once -#include +#include +#include #include #include diff --git a/src/tests/utils/disposable_observable.hpp b/src/tests/utils/disposable_observable.hpp index 573c62fb2..1904d4732 100644 --- a/src/tests/utils/disposable_observable.hpp +++ b/src/tests/utils/disposable_observable.hpp @@ -10,7 +10,8 @@ #pragma once -#include +#include +#include #include #include diff --git a/src/tests/utils/rpp_trompeloil.hpp b/src/tests/utils/rpp_trompeloil.hpp index c0098eb46..f6bbcb933 100644 --- a/src/tests/utils/rpp_trompeloil.hpp +++ b/src/tests/utils/rpp_trompeloil.hpp @@ -1,10 +1,10 @@ #pragma once -#include -#include - #include +#include +#include + #include #include diff --git a/src/tests/utils/snitch_logging.hpp b/src/tests/utils/snitch_logging.hpp deleted file mode 100644 index 20d6c0ebb..000000000 --- a/src/tests/utils/snitch_logging.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once -#include -#include - -#include - -#include -#include - -template -concept appendable = requires(snitch::small_string_span ss, const T& v) { append(ss, v); }; - -namespace rpp -{ - inline bool append(snitch::small_string_span ss, rpp::schedulers::time_point& v) - { - return append(ss, v.time_since_epoch().count()); - } -} // namespace rpp - -namespace std -{ - template - bool append(snitch::small_string_span ss, const std::vector& v) - { - return append(ss, "{") - && std::all_of(v.cbegin(), v.cend(), [&ss](const T& vv) { return append(ss, vv) && append(ss, ", "); }) - && append(ss, "}"); - } - - template - bool append(snitch::small_string_span ss, const std::tuple& v) - { - return append(ss, "{") - && std::apply([&ss](const auto&... vv) { return ((append(ss, vv) && append(ss, ", ")) && ...); }, v) - && append(ss, "}"); - } - - template - bool append(snitch::small_string_span ss, const std::chrono::time_point& v) - { - return append(ss, v.time_since_epoch().count()); - } -} // namespace std From 2a61f0723da11ff0bfc4924d4811228ff874fec5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 15:47:53 +0000 Subject: [PATCH 03/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/tests/rpp/test_buffer.cpp | 2 +- src/tests/rpp/test_combine_latest.cpp | 14 +++++++------- src/tests/rpp/test_concat.cpp | 2 +- src/tests/rpp/test_connectable_observable.cpp | 2 +- src/tests/rpp/test_debounce.cpp | 2 +- src/tests/rpp/test_defer.cpp | 2 +- src/tests/rpp/test_delay.cpp | 2 +- src/tests/rpp/test_disposables.cpp | 2 +- src/tests/rpp/test_distinct.cpp | 2 +- src/tests/rpp/test_distinct_until_changed.cpp | 2 +- src/tests/rpp/test_filter.cpp | 2 +- src/tests/rpp/test_finally.cpp | 2 +- src/tests/rpp/test_first.cpp | 2 +- src/tests/rpp/test_flat_map.cpp | 2 +- src/tests/rpp/test_from.cpp | 2 +- src/tests/rpp/test_group_by.cpp | 2 +- src/tests/rpp/test_interval.cpp | 3 +-- src/tests/rpp/test_last.cpp | 2 +- src/tests/rpp/test_map.cpp | 2 +- src/tests/rpp/test_merge.cpp | 2 +- src/tests/rpp/test_observables.cpp | 2 +- src/tests/rpp/test_observers.cpp | 2 +- src/tests/rpp/test_on_error_resume_next.cpp | 2 +- src/tests/rpp/test_reduce.cpp | 2 +- src/tests/rpp/test_repeat.cpp | 2 +- src/tests/rpp/test_scan.cpp | 2 +- src/tests/rpp/test_scheduler.cpp | 2 +- src/tests/rpp/test_skip.cpp | 2 +- src/tests/rpp/test_start_with.cpp | 2 +- src/tests/rpp/test_subjects.cpp | 2 +- src/tests/rpp/test_subscribe.cpp | 2 +- src/tests/rpp/test_subscribe_on.cpp | 2 +- src/tests/rpp/test_switch_on_next.cpp | 2 +- src/tests/rpp/test_take.cpp | 2 +- src/tests/rpp/test_take_last.cpp | 2 +- src/tests/rpp/test_take_until.cpp | 2 +- src/tests/rpp/test_take_while.cpp | 2 +- src/tests/rpp/test_tap.cpp | 2 +- src/tests/rpp/test_throttle.cpp | 2 +- src/tests/rpp/test_timeout.cpp | 2 +- src/tests/rpp/test_timer.cpp | 2 +- src/tests/rpp/test_window.cpp | 2 +- src/tests/rpp/test_window_toggle.cpp | 2 +- src/tests/rpp/test_with_latest_from.cpp | 2 +- src/tests/rpp/test_zip.cpp | 2 +- src/tests/rppqt/test_from_signal.cpp | 2 +- src/tests/rppqt/test_main_thread_scheduler.cpp | 2 +- src/tests/utils/copy_count_tracker.hpp | 2 +- src/tests/utils/disposable_observable.hpp | 2 +- src/tests/utils/rpp_trompeloil.hpp | 6 +++--- 50 files changed, 58 insertions(+), 59 deletions(-) diff --git a/src/tests/rpp/test_buffer.cpp b/src/tests/rpp/test_buffer.cpp index 23855b5a1..82964c588 100644 --- a/src/tests/rpp/test_buffer.cpp +++ b/src/tests/rpp/test_buffer.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_combine_latest.cpp b/src/tests/rpp/test_combine_latest.cpp index 7445c8915..a395bfd70 100644 --- a/src/tests/rpp/test_combine_latest.cpp +++ b/src/tests/rpp/test_combine_latest.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include @@ -28,8 +28,8 @@ TEST_CASE("combine_latest bundles items") { SECTION("observable of -1-2-3-| combines with -4-5-6-| on immediate scheduler") { - auto mock = mock_observer>{}; - trompeloeil::sequence seq; + auto mock = mock_observer>{}; + trompeloeil::sequence seq; REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 6))).IN_SEQUENCE(seq); REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(2, 6))).IN_SEQUENCE(seq); @@ -43,8 +43,8 @@ TEST_CASE("combine_latest bundles items") SECTION("observable of -1-2-3-| combines with -4-5-6-| on current_thread") { - auto mock = mock_observer>{}; - trompeloeil::sequence seq; + auto mock = mock_observer>{}; + trompeloeil::sequence seq; REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 4))).IN_SEQUENCE(seq); REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 5))).IN_SEQUENCE(seq); @@ -64,8 +64,8 @@ TEST_CASE("combine_latest bundles items") SECTION("observable of -1-2-3-| combines with two other sources on current_thread") { - auto mock = mock_observer>{}; - trompeloeil::sequence seq; + auto mock = mock_observer>{}; + trompeloeil::sequence seq; REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 4, 7))).IN_SEQUENCE(seq); REQUIRE_CALL(*mock, on_next_rvalue(std::make_tuple(1, 5, 7))).IN_SEQUENCE(seq); diff --git a/src/tests/rpp/test_concat.cpp b/src/tests/rpp/test_concat.cpp index 030f90343..3f2527cf1 100644 --- a/src/tests/rpp/test_concat.cpp +++ b/src/tests/rpp/test_concat.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_connectable_observable.cpp b/src/tests/rpp/test_connectable_observable.cpp index 0b63123a5..ac065adb2 100644 --- a/src/tests/rpp/test_connectable_observable.cpp +++ b/src/tests/rpp/test_connectable_observable.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_debounce.cpp b/src/tests/rpp/test_debounce.cpp index 87b31e819..6510a54ec 100644 --- a/src/tests/rpp/test_debounce.cpp +++ b/src/tests/rpp/test_debounce.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_defer.cpp b/src/tests/rpp/test_defer.cpp index 67200856a..0f841597f 100644 --- a/src/tests/rpp/test_defer.cpp +++ b/src/tests/rpp/test_defer.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_delay.cpp b/src/tests/rpp/test_delay.cpp index 0d93051e0..b0806f82c 100644 --- a/src/tests/rpp/test_delay.cpp +++ b/src/tests/rpp/test_delay.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_disposables.cpp b/src/tests/rpp/test_disposables.cpp index 8e1584a94..7c60fc64e 100644 --- a/src/tests/rpp/test_disposables.cpp +++ b/src/tests/rpp/test_disposables.cpp @@ -7,8 +7,8 @@ // // Project home: https://github.com/victimsnino/ReactivePlusPlus -#include #include +#include #include #include diff --git a/src/tests/rpp/test_distinct.cpp b/src/tests/rpp/test_distinct.cpp index 15ef32a5a..223c9fd9f 100644 --- a/src/tests/rpp/test_distinct.cpp +++ b/src/tests/rpp/test_distinct.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_distinct_until_changed.cpp b/src/tests/rpp/test_distinct_until_changed.cpp index b4a35455d..74e8a4377 100644 --- a/src/tests/rpp/test_distinct_until_changed.cpp +++ b/src/tests/rpp/test_distinct_until_changed.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_filter.cpp b/src/tests/rpp/test_filter.cpp index dd4621ed6..d0387a91e 100644 --- a/src/tests/rpp/test_filter.cpp +++ b/src/tests/rpp/test_filter.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_finally.cpp b/src/tests/rpp/test_finally.cpp index a711a1678..4c4c66f4b 100644 --- a/src/tests/rpp/test_finally.cpp +++ b/src/tests/rpp/test_finally.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_first.cpp b/src/tests/rpp/test_first.cpp index a35c3b6ad..f41ee9b00 100644 --- a/src/tests/rpp/test_first.cpp +++ b/src/tests/rpp/test_first.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_flat_map.cpp b/src/tests/rpp/test_flat_map.cpp index d0613452f..a267db021 100644 --- a/src/tests/rpp/test_flat_map.cpp +++ b/src/tests/rpp/test_flat_map.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_from.cpp b/src/tests/rpp/test_from.cpp index 198b28941..f058c0f93 100644 --- a/src/tests/rpp/test_from.cpp +++ b/src/tests/rpp/test_from.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_group_by.cpp b/src/tests/rpp/test_group_by.cpp index 7f6832276..76d5c43b1 100644 --- a/src/tests/rpp/test_group_by.cpp +++ b/src/tests/rpp/test_group_by.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_interval.cpp b/src/tests/rpp/test_interval.cpp index fe1552646..4471eab55 100644 --- a/src/tests/rpp/test_interval.cpp +++ b/src/tests/rpp/test_interval.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include @@ -21,7 +21,6 @@ #include #include - #include TEST_CASE("interval emit values with provided interval") diff --git a/src/tests/rpp/test_last.cpp b/src/tests/rpp/test_last.cpp index d533f281b..21a110f5b 100644 --- a/src/tests/rpp/test_last.cpp +++ b/src/tests/rpp/test_last.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_map.cpp b/src/tests/rpp/test_map.cpp index 8164be9ee..23a9824be 100644 --- a/src/tests/rpp/test_map.cpp +++ b/src/tests/rpp/test_map.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_merge.cpp b/src/tests/rpp/test_merge.cpp index b8dc4bc7f..0ee6c65ec 100644 --- a/src/tests/rpp/test_merge.cpp +++ b/src/tests/rpp/test_merge.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_observables.cpp b/src/tests/rpp/test_observables.cpp index 543976d53..2aeb295b3 100644 --- a/src/tests/rpp/test_observables.cpp +++ b/src/tests/rpp/test_observables.cpp @@ -7,8 +7,8 @@ // // Project home: https://github.com/victimsnino/ReactivePlusPlus -#include #include +#include #include #include diff --git a/src/tests/rpp/test_observers.cpp b/src/tests/rpp/test_observers.cpp index 052803d29..449527058 100644 --- a/src/tests/rpp/test_observers.cpp +++ b/src/tests/rpp/test_observers.cpp @@ -7,8 +7,8 @@ // // Project home: https://github.com/victimsnino/ReactivePlusPlus -#include #include +#include #include diff --git a/src/tests/rpp/test_on_error_resume_next.cpp b/src/tests/rpp/test_on_error_resume_next.cpp index 286c5a0c7..77078d7d2 100644 --- a/src/tests/rpp/test_on_error_resume_next.cpp +++ b/src/tests/rpp/test_on_error_resume_next.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_reduce.cpp b/src/tests/rpp/test_reduce.cpp index 2fd1839ff..9ea9e4669 100644 --- a/src/tests/rpp/test_reduce.cpp +++ b/src/tests/rpp/test_reduce.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_repeat.cpp b/src/tests/rpp/test_repeat.cpp index d5108814c..9d1635d13 100644 --- a/src/tests/rpp/test_repeat.cpp +++ b/src/tests/rpp/test_repeat.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_scan.cpp b/src/tests/rpp/test_scan.cpp index f05996183..00dfbd23d 100644 --- a/src/tests/rpp/test_scan.cpp +++ b/src/tests/rpp/test_scan.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_scheduler.cpp b/src/tests/rpp/test_scheduler.cpp index 47d350dd0..3d13936bd 100644 --- a/src/tests/rpp/test_scheduler.cpp +++ b/src/tests/rpp/test_scheduler.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_skip.cpp b/src/tests/rpp/test_skip.cpp index be0890fe5..b4b30dfdc 100644 --- a/src/tests/rpp/test_skip.cpp +++ b/src/tests/rpp/test_skip.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_start_with.cpp b/src/tests/rpp/test_start_with.cpp index f0853645d..0f8ae1953 100644 --- a/src/tests/rpp/test_start_with.cpp +++ b/src/tests/rpp/test_start_with.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_subjects.cpp b/src/tests/rpp/test_subjects.cpp index 1fed1c85d..5f7ddbb74 100644 --- a/src/tests/rpp/test_subjects.cpp +++ b/src/tests/rpp/test_subjects.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_subscribe.cpp b/src/tests/rpp/test_subscribe.cpp index 569cc2e84..8fca2b799 100644 --- a/src/tests/rpp/test_subscribe.cpp +++ b/src/tests/rpp/test_subscribe.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_subscribe_on.cpp b/src/tests/rpp/test_subscribe_on.cpp index fd37a065c..aa6369388 100644 --- a/src/tests/rpp/test_subscribe_on.cpp +++ b/src/tests/rpp/test_subscribe_on.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_switch_on_next.cpp b/src/tests/rpp/test_switch_on_next.cpp index 09855806c..f16d19e62 100644 --- a/src/tests/rpp/test_switch_on_next.cpp +++ b/src/tests/rpp/test_switch_on_next.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_take.cpp b/src/tests/rpp/test_take.cpp index 19fa01837..ed62e148d 100644 --- a/src/tests/rpp/test_take.cpp +++ b/src/tests/rpp/test_take.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_take_last.cpp b/src/tests/rpp/test_take_last.cpp index c6006303c..ed21b8313 100644 --- a/src/tests/rpp/test_take_last.cpp +++ b/src/tests/rpp/test_take_last.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_take_until.cpp b/src/tests/rpp/test_take_until.cpp index abca81337..f149c3d95 100644 --- a/src/tests/rpp/test_take_until.cpp +++ b/src/tests/rpp/test_take_until.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_take_while.cpp b/src/tests/rpp/test_take_while.cpp index cab8f5f94..0e1f73e6a 100644 --- a/src/tests/rpp/test_take_while.cpp +++ b/src/tests/rpp/test_take_while.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_tap.cpp b/src/tests/rpp/test_tap.cpp index 602ac506b..e1b4de6f9 100644 --- a/src/tests/rpp/test_tap.cpp +++ b/src/tests/rpp/test_tap.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_throttle.cpp b/src/tests/rpp/test_throttle.cpp index 2f7db0e26..f385642c6 100644 --- a/src/tests/rpp/test_throttle.cpp +++ b/src/tests/rpp/test_throttle.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_timeout.cpp b/src/tests/rpp/test_timeout.cpp index 820f04eef..025dfee46 100644 --- a/src/tests/rpp/test_timeout.cpp +++ b/src/tests/rpp/test_timeout.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_timer.cpp b/src/tests/rpp/test_timer.cpp index 01c29cfd1..508fd74e0 100644 --- a/src/tests/rpp/test_timer.cpp +++ b/src/tests/rpp/test_timer.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_window.cpp b/src/tests/rpp/test_window.cpp index 3759842d3..de5130b85 100644 --- a/src/tests/rpp/test_window.cpp +++ b/src/tests/rpp/test_window.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_window_toggle.cpp b/src/tests/rpp/test_window_toggle.cpp index 6d2512ad3..a0a73b385 100644 --- a/src/tests/rpp/test_window_toggle.cpp +++ b/src/tests/rpp/test_window_toggle.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_with_latest_from.cpp b/src/tests/rpp/test_with_latest_from.cpp index bd09c78f9..b6bbddbdc 100644 --- a/src/tests/rpp/test_with_latest_from.cpp +++ b/src/tests/rpp/test_with_latest_from.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rpp/test_zip.cpp b/src/tests/rpp/test_zip.cpp index b02e17d59..aaec6a20b 100644 --- a/src/tests/rpp/test_zip.cpp +++ b/src/tests/rpp/test_zip.cpp @@ -8,8 +8,8 @@ // Project home: https://github.com/victimsnino/ReactivePlusPlus // -#include #include +#include #include #include diff --git a/src/tests/rppqt/test_from_signal.cpp b/src/tests/rppqt/test_from_signal.cpp index c5b9ed21d..e83aa45af 100644 --- a/src/tests/rppqt/test_from_signal.cpp +++ b/src/tests/rppqt/test_from_signal.cpp @@ -38,8 +38,8 @@ struct TestQObject : public QObject void NoValueSignal(); }; -#include #include +#include #include diff --git a/src/tests/rppqt/test_main_thread_scheduler.cpp b/src/tests/rppqt/test_main_thread_scheduler.cpp index 96818b173..8fa5ef022 100644 --- a/src/tests/rppqt/test_main_thread_scheduler.cpp +++ b/src/tests/rppqt/test_main_thread_scheduler.cpp @@ -7,8 +7,8 @@ // // Project home: https://github.com/victimsnino/ReactivePlusPlus -#include #include +#include #include #include diff --git a/src/tests/utils/copy_count_tracker.hpp b/src/tests/utils/copy_count_tracker.hpp index 36f303dbb..05ccee242 100644 --- a/src/tests/utils/copy_count_tracker.hpp +++ b/src/tests/utils/copy_count_tracker.hpp @@ -10,8 +10,8 @@ #pragma once -#include #include +#include #include #include diff --git a/src/tests/utils/disposable_observable.hpp b/src/tests/utils/disposable_observable.hpp index 1904d4732..826c9f918 100644 --- a/src/tests/utils/disposable_observable.hpp +++ b/src/tests/utils/disposable_observable.hpp @@ -10,8 +10,8 @@ #pragma once -#include #include +#include #include #include diff --git a/src/tests/utils/rpp_trompeloil.hpp b/src/tests/utils/rpp_trompeloil.hpp index f6bbcb933..edd7bebc4 100644 --- a/src/tests/utils/rpp_trompeloil.hpp +++ b/src/tests/utils/rpp_trompeloil.hpp @@ -1,9 +1,9 @@ #pragma once -#include - -#include #include +#include + +#include #include From a40eb71626f5279b471054337f88982ecf92d20b Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Thu, 23 May 2024 18:58:44 +0300 Subject: [PATCH 04/17] one more --- cmake/dependencies.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 0fd864d1d..e88638f7a 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -73,7 +73,8 @@ endif() # ===================== Tests =================== if (RPP_BUILD_TESTS) - rpp_fetch_library_extended(catch2 https://github.com/catchorg/Catch2.git v3.6.0 Catch2WithMain) + rpp_fetch_library(Catch2 https://github.com/catchorg/Catch2.git v3.6.0) + rpp_handle_3rdparty(Catch2WithMain) rpp_fetch_library(trompeloeil https://github.com/rollbear/trompeloeil.git main) endif() From 14e889e76e286cacd86d2d88e97bc18a6f18a3b7 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Thu, 23 May 2024 19:06:44 +0300 Subject: [PATCH 05/17] one more attempt --- cmake/dependencies.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index e88638f7a..c7269919b 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -74,7 +74,6 @@ endif() # ===================== Tests =================== if (RPP_BUILD_TESTS) rpp_fetch_library(Catch2 https://github.com/catchorg/Catch2.git v3.6.0) - rpp_handle_3rdparty(Catch2WithMain) rpp_fetch_library(trompeloeil https://github.com/rollbear/trompeloeil.git main) endif() From f2b64ef1ffee1823a7f0aa399e0e6bda95b918fe Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Thu, 23 May 2024 19:14:05 +0300 Subject: [PATCH 06/17] fix --- src/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index fcd7e5c12..6007578d1 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -14,7 +14,7 @@ macro(add_test_target target_name module files) set(TARGET ${target_name}) add_executable(${TARGET} ${files}) - target_link_libraries(${TARGET} PRIVATE Catch2WithMain trompeloeil::trompeloeil rpp_tests_utils ${module}) + target_link_libraries(${TARGET} PRIVATE Catch2::Catch2WithMain trompeloeil::trompeloeil rpp_tests_utils ${module}) target_compile_definitions(${TARGET} PRIVATE "CATCH_CONFIG_FAST_COMPILE") set_target_properties(${TARGET} PROPERTIES FOLDER Tests/Suites/${module}) From 24ff8a67471ba3b34e2768d8ef16f3b32f9f3eeb Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Thu, 23 May 2024 19:21:32 +0300 Subject: [PATCH 07/17] Try one more --- cmake/dependencies.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index c7269919b..e88638f7a 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -74,6 +74,7 @@ endif() # ===================== Tests =================== if (RPP_BUILD_TESTS) rpp_fetch_library(Catch2 https://github.com/catchorg/Catch2.git v3.6.0) + rpp_handle_3rdparty(Catch2WithMain) rpp_fetch_library(trompeloeil https://github.com/rollbear/trompeloeil.git main) endif() From 9c4b7d92aaead2e33d43a5031a261f65225c13ce Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Thu, 23 May 2024 22:41:21 +0300 Subject: [PATCH 08/17] Update dependencies.cmake --- cmake/dependencies.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index e88638f7a..c7269919b 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -74,7 +74,6 @@ endif() # ===================== Tests =================== if (RPP_BUILD_TESTS) rpp_fetch_library(Catch2 https://github.com/catchorg/Catch2.git v3.6.0) - rpp_handle_3rdparty(Catch2WithMain) rpp_fetch_library(trompeloeil https://github.com/rollbear/trompeloeil.git main) endif() From 2b2a0859cb45483cd4e13464a757545417881a88 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 00:26:33 +0300 Subject: [PATCH 09/17] compile fixes --- src/tests/rpp/test_connectable_observable.cpp | 4 ++-- src/tests/rpp/test_delay.cpp | 4 ++-- src/tests/rpp/test_observers.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/rpp/test_connectable_observable.cpp b/src/tests/rpp/test_connectable_observable.cpp index ac065adb2..435ac1127 100644 --- a/src/tests/rpp/test_connectable_observable.cpp +++ b/src/tests/rpp/test_connectable_observable.cpp @@ -26,7 +26,7 @@ TEST_CASE("connectable observable") SECTION("source and connectable observable from it") { auto source = rpp::source::just(1); - auto test = [&mock, &d](auto&& connectable) { + auto test = [&](auto&& connectable) { SECTION("subscribe on connectable") { connectable.subscribe(mock.get_observer(d)); @@ -87,7 +87,7 @@ TEST_CASE("connectable observable") SECTION("subject as source and connectable observable from it") { auto source = rpp::subjects::publish_subject(); - auto test = [&mock, &source, &d](auto&& connectable) { + auto test = [&](auto&& connectable) { SECTION("subscribe on connectable and connect") { connectable.subscribe(mock.get_observer(d)); diff --git a/src/tests/rpp/test_delay.cpp b/src/tests/rpp/test_delay.cpp index b0806f82c..64dbfdf3c 100644 --- a/src/tests/rpp/test_delay.cpp +++ b/src/tests/rpp/test_delay.cpp @@ -56,7 +56,7 @@ TEST_CASE("delay delays observable's emissions") std::chrono::milliseconds delay_duration{300}; auto scheduler = test_scheduler{}; - auto subscribe_with_delay = [&mock, &delay_duration](auto get_now) { + auto subscribe_with_delay = [&](auto get_now) { const auto now = get_now(); return rpp::ops::subscribe( [&, now, get_now](const auto& v) { @@ -244,7 +244,7 @@ TEST_CASE("observe_on forward error immediately") std::chrono::milliseconds delay_duration{300}; auto scheduler = test_scheduler{}; - auto subscribe_with_delay = [&mock, &delay_duration](auto get_now) { + auto subscribe_with_delay = [&](auto get_now) { const auto now = get_now(); return rpp::ops::subscribe( [&, now, get_now](const auto& v) { diff --git a/src/tests/rpp/test_observers.cpp b/src/tests/rpp/test_observers.cpp index 449527058..11d890cab 100644 --- a/src/tests/rpp/test_observers.cpp +++ b/src/tests/rpp/test_observers.cpp @@ -77,7 +77,7 @@ TEST_CASE("lambda observer works properly as base observer") TEST_CASE("as_dynamic keeps disposing") { - auto check = [](auto&& observer) { + auto check = [&](auto&& observer) { SECTION("dispose and convert to dynamic") { observer.on_completed(); @@ -162,7 +162,7 @@ TEST_CASE("set_upstream without base disposable makes it main disposalbe") { auto original_observer = rpp::make_lambda_observer([](int) {}, [](const std::exception_ptr&) {}, []() {}); - auto test_observer = [](auto&& observer) { + auto test_observer = [&](auto&& observer) { auto upstream = rpp::disposable_wrapper::make(); observer.set_upstream(upstream); CHECK(!upstream.is_disposed()); @@ -233,7 +233,7 @@ TEST_CASE("set_upstream depends on base disposable") [](const std::exception_ptr&) {}, []() {}); - auto test_observer = [&d](auto&& observer) { + auto test_observer = [&](auto&& observer) { auto upstream = rpp::disposable_wrapper::make(); CHECK(!d.is_disposed()); From e4c9a355a8baa74f5589a1ac3d01de2351b2bcaf Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 09:35:50 +0300 Subject: [PATCH 10/17] Update CMakePresets.json --- CMakePresets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 8a5aa475a..6200e15ca 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -144,7 +144,7 @@ "cacheVariables": { "CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake/conan_provider.cmake", "CONAN_ARGS": "", - "CONAN_INSTALL_ARGS": "--build=missing;-s=compiler.cppstd=20;-c=tools.system.package_manager:mode=install;-c=tools.system.package_manager:sudo=True" + "CONAN_INSTALL_ARGS": "--build=missing;-s compiler.cppstd=20;-c tools.system.package_manager:mode=install;-c tools.system.package_manager:sudo=True" } }, { From a8bf533dc4973bd18a831bfe1ec37318d264f39c Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 09:50:09 +0300 Subject: [PATCH 11/17] Update CMakePresets.json --- CMakePresets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 6200e15ca..4b9ec3ae2 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -144,7 +144,7 @@ "cacheVariables": { "CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake/conan_provider.cmake", "CONAN_ARGS": "", - "CONAN_INSTALL_ARGS": "--build=missing;-s compiler.cppstd=20;-c tools.system.package_manager:mode=install;-c tools.system.package_manager:sudo=True" + "CONAN_INSTALL_ARGS": "--build=missing;-s:a compiler.cppstd=20;-c:a tools.system.package_manager:mode=install;-c:a tools.system.package_manager:sudo=True" } }, { From da33c65aeed2039e0d06d7849be0e8688c49de9a Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 09:53:49 +0300 Subject: [PATCH 12/17] one more --- CMakePresets.json | 2 +- conanfile.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 4b9ec3ae2..2b2c7688d 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -144,7 +144,7 @@ "cacheVariables": { "CMAKE_PROJECT_TOP_LEVEL_INCLUDES": "cmake/conan_provider.cmake", "CONAN_ARGS": "", - "CONAN_INSTALL_ARGS": "--build=missing;-s:a compiler.cppstd=20;-c:a tools.system.package_manager:mode=install;-c:a tools.system.package_manager:sudo=True" + "CONAN_INSTALL_ARGS": "--build=missing;-s:a compiler.cppstd=20;-c tools.system.package_manager:mode=install;-c tools.system.package_manager:sudo=True" } }, { diff --git a/conanfile.py b/conanfile.py index 8303541d1..f7bb8f74a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -4,6 +4,7 @@ class RppConan(ConanFile): name = "rpp" settings = "os", "compiler", "build_type", "arch" generators = "CMakeDeps", "CMakeToolchain" + extension_properties = {"compatibility_cppstd": False} options = { "with_grpc" : [False, True], From d4cbfe3574c0f359eaa3246d09a0dfdf491ebca6 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 10:07:34 +0300 Subject: [PATCH 13/17] try re-hashing --- .github/workflows/analyzers.yml | 4 ++-- .github/workflows/ci v2.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/analyzers.yml b/.github/workflows/analyzers.yml index 8f4f46d2e..e4cd67e56 100644 --- a/.github/workflows/analyzers.yml +++ b/.github/workflows/analyzers.yml @@ -47,7 +47,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-ci-ubuntu-clang-Release-${{ hashFiles('conanfile.py') }} + key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }} restore-keys: deps-ci-ubuntu-clang-Release - name: conan detect profile @@ -131,7 +131,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-ci-ubuntu-clang-Release-${{ hashFiles('conanfile.py') }} + key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }} restore-keys: deps-ci-ubuntu-clang-Release - name: conan detect profile diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 82635a7ea..55579cf7a 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -59,7 +59,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('conanfile.py') }} + key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }} restore-keys: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }} - name: conan detect profile @@ -110,7 +110,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-ci-ubuntu-clang-Release-${{ hashFiles('conanfile.py') }} + key: deps-ci-ubuntu-clang-Release-${{ hashFiles('**/conanfile.py') }} restore-keys: deps-ci-ubuntu-clang-Release - name: conan detect profile @@ -187,7 +187,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('conanfile.py') }} + key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}-${{ hashFiles('**/conanfile.py') }} restore-keys: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }} - name: conan detect profile From b4b183fa1f34db32c8b7c44a6270e2b878c1dfc5 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 10:16:44 +0300 Subject: [PATCH 14/17] one more attempt --- cmake/dependencies.cmake | 1 + src/tests/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index c7269919b..0b5ced9a2 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -74,6 +74,7 @@ endif() # ===================== Tests =================== if (RPP_BUILD_TESTS) rpp_fetch_library(Catch2 https://github.com/catchorg/Catch2.git v3.6.0) + target_compile_features(Catch2::Catch2WithMain PRIVATE cxx_std_20) rpp_fetch_library(trompeloeil https://github.com/rollbear/trompeloeil.git main) endif() diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 6007578d1..855142c86 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -24,6 +24,8 @@ macro(add_test_target target_name module files) rpp_add_qt_support_to_executable(${TARGET}) endif() + target_compile_features(${TARGET} PRIVATE cxx_std_20) + if(MSVC) target_compile_options(${TARGET} PRIVATE /W4 /WX /wd4702) else() From 58af678d4fd4a76f2c54a7a66d21afd924615b09 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 10:21:00 +0300 Subject: [PATCH 15/17] one more --- cmake/dependencies.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 0b5ced9a2..cd7a23f8c 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -74,7 +74,7 @@ endif() # ===================== Tests =================== if (RPP_BUILD_TESTS) rpp_fetch_library(Catch2 https://github.com/catchorg/Catch2.git v3.6.0) - target_compile_features(Catch2::Catch2WithMain PRIVATE cxx_std_20) + target_compile_features(Catch2::Catch2WithMain INTERFACE cxx_std_20) rpp_fetch_library(trompeloeil https://github.com/rollbear/trompeloeil.git main) endif() From 1ed7deb4e89483998cd241900a132fa82fc8b450 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 10:55:12 +0300 Subject: [PATCH 16/17] fix --- src/tests/rppqt/test_main_thread_scheduler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/rppqt/test_main_thread_scheduler.cpp b/src/tests/rppqt/test_main_thread_scheduler.cpp index 8fa5ef022..f2fa25c0e 100644 --- a/src/tests/rppqt/test_main_thread_scheduler.cpp +++ b/src/tests/rppqt/test_main_thread_scheduler.cpp @@ -21,6 +21,7 @@ #include #include #include +#include TEST_CASE("main_thread_scheduler schedules actions to main thread") { @@ -48,7 +49,7 @@ TEST_CASE("main_thread_scheduler schedules actions to main thread") { auto future = execution_thread.get_future(); REQUIRE(future.wait_for(std::chrono::seconds{1}) == std::future_status::ready); - CHECK(future.get() == std::this_thread::get_id()); + CHECK((future.get() == std::this_thread::get_id())); } } From b821da249fcec597aebbe30e9241e77ae21447d4 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Fri, 24 May 2024 14:49:32 +0300 Subject: [PATCH 17/17] typo --- src/tests/rpp/test_subscribe_on.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/rpp/test_subscribe_on.cpp b/src/tests/rpp/test_subscribe_on.cpp index aa6369388..5a39e7be3 100644 --- a/src/tests/rpp/test_subscribe_on.cpp +++ b/src/tests/rpp/test_subscribe_on.cpp @@ -112,7 +112,7 @@ TEST_CASE("subscribe_on schedules job in another scheduler") } -TEST_CASE("group_by satisfies disposable contracts") +TEST_CASE("subscribe_on satisfies disposable contracts") { test_operator_with_disposable(rpp::ops::subscribe_on(rpp::schedulers::current_thread{})); }