Skip to content

Commit

Permalink
Fixing type error.
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-parent committed Jan 28, 2025
1 parent 8e18490 commit 8e638bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions test/future_when_any_arguments_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_with_one_argument) {

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p0));
BOOST_REQUIRE((std::pair{0, 0} == await(std::move(result))));
BOOST_REQUIRE((std::pair{0, std::size_t{0}} == await(std::move(result))));
}

BOOST_AUTO_TEST_CASE(future_when_any_multiple_arguments_first_succeeds) {
Expand All @@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_multiple_arguments_first_succeeds) {

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p0));
BOOST_REQUIRE((std::pair{0, 0} == await(std::move(result))));
BOOST_REQUIRE((std::pair{0, std::size_t{0}} == await(std::move(result))));
}

BOOST_AUTO_TEST_CASE(future_when_any_multiple_arguments_third_succeeds) {
Expand All @@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_multiple_arguments_third_succeeds) {

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p2));
BOOST_REQUIRE((std::pair{2, 2} == await(std::move(result))));
BOOST_REQUIRE((std::pair{2, std::size_t{2}} == await(std::move(result))));
}

BOOST_AUTO_TEST_CASE(future_when_any_one_succeeds_all_others_fail) {
Expand All @@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_one_succeeds_all_others_fail) {
p3.set_exception(std::make_exception_ptr(test_exception("failure")));
BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p2));
BOOST_REQUIRE((std::pair{2, 2} == await(std::move(result))));
BOOST_REQUIRE((std::pair{2, std::size_t{2}} == await(std::move(result))));
}

BOOST_AUTO_TEST_CASE(future_when_any_all_fail) {
Expand Down Expand Up @@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_int_arguments_with_diamond_formation_argume

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(initial_promise));
BOOST_REQUIRE((std::pair{43, 0} == await(std::move(result))));
BOOST_REQUIRE((std::pair{43, std::size_t{0}} == await(std::move(result))));
}

BOOST_AUTO_TEST_SUITE_END()
Expand All @@ -148,7 +148,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_move_only_arguments) {

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p0));
BOOST_REQUIRE((std::pair{move_only(0), 0} == await(std::move(result))));
BOOST_REQUIRE((std::pair{move_only(0), std::size_t{0}} == await(std::move(result))));
}

BOOST_AUTO_TEST_SUITE_END()
12 changes: 6 additions & 6 deletions test/future_when_any_range_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_int_void_range_with_one_element) {

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p0));
BOOST_REQUIRE((std::pair{0, 0} == await(std::move(result))));
BOOST_REQUIRE((std::pair{0, std::size_t{0}} == await(std::move(result))));
}

BOOST_AUTO_TEST_CASE(future_when_any_int_void_range_with_many_elements_first_succeeds) {
Expand All @@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_int_void_range_with_many_elements_first_suc

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p0));
BOOST_REQUIRE((std::pair{0, 0} == await(std::move(result))));
BOOST_REQUIRE((std::pair{0, std::size_t{0}} == await(std::move(result))));
}

BOOST_AUTO_TEST_CASE(future_when_any_int_void_range_with_many_elements_middle_succeeds) {
Expand All @@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_int_void_range_with_many_elements_middle_su

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p2));
BOOST_REQUIRE((std::pair{2, 2} == await(std::move(result))));
BOOST_REQUIRE((std::pair{2, std::size_t{2}} == await(std::move(result))));
}

BOOST_AUTO_TEST_CASE(
Expand All @@ -133,7 +133,7 @@ BOOST_AUTO_TEST_CASE(
p3.set_exception(std::make_exception_ptr(test_exception("failure")));
BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p2));
BOOST_REQUIRE((std::pair{2, 2} == await(std::move(result))));
BOOST_REQUIRE((std::pair{2, std::size_t{2}} == await(std::move(result))));
}

BOOST_AUTO_TEST_CASE(future_when_any_void_all_are_ready_at_the_beginning) {
Expand Down Expand Up @@ -183,7 +183,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_void_range_with_diamond_formation_elements)

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(initial_promise));
BOOST_REQUIRE((std::pair{43, 0} == await(std::move(result))));
BOOST_REQUIRE((std::pair{43, std::size_t{0}} == await(std::move(result))));
}
BOOST_AUTO_TEST_SUITE_END()

Expand All @@ -201,7 +201,7 @@ BOOST_AUTO_TEST_CASE(future_when_any_range_move_only) {

BOOST_REQUIRE(!result.is_ready());
default_executor(std::move(p0));
BOOST_REQUIRE((std::pair{move_only(0), 0} == await(std::move(result))));
BOOST_REQUIRE((std::pair{move_only(0), std::size_t{0}} == await(std::move(result))));
}

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit 8e638bb

Please sign in to comment.