Skip to content

Commit

Permalink
Use uniform initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
oboukli committed Sep 4, 2023
1 parent 1df562b commit ec8fde8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/first_missing_positive_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ TEST_CASE("first_missing_positive") {
}

SECTION("One number") {
auto [test_input, expected_output]
= GENERATE(table<std::array<int, 1>, int>({
auto [test_input, expected_output]{
GENERATE(table<std::array<int, 1>, int>({
{{-2}, 1},
{{-1}, 1},
{{0}, 1},
{{1}, 2},
{{2}, 1},
{{11}, 1},
}));
}))};

CAPTURE(test_input);

Expand All @@ -44,8 +44,8 @@ TEST_CASE("first_missing_positive") {
}

SECTION("Two numbers") {
auto [test_input, expected_output]
= GENERATE(table<std::vector<int>, int>({
auto [test_input, expected_output]{
GENERATE(table<std::vector<int>, int>({
{{-2, -2}, 1},
{{-1, -2}, 1},
{{0, -2}, 1},
Expand All @@ -56,7 +56,7 @@ TEST_CASE("first_missing_positive") {
{{1, 2}, 3},
{{2, 1}, 3},
{{2, 2}, 1},
}));
}))};

CAPTURE(test_input);

Expand All @@ -66,8 +66,8 @@ TEST_CASE("first_missing_positive") {
}

SECTION("Three numbers") {
auto [test_input, expected_output]
= GENERATE(table<std::vector<int>, int>({
auto [test_input, expected_output]{
GENERATE(table<std::vector<int>, int>({
{{-1, -1, -1}, 1},
{{-1, 0, 0}, 1},
{{0, 0, 0}, 1},
Expand All @@ -79,7 +79,7 @@ TEST_CASE("first_missing_positive") {
{{1, 1, 1}, 2},
{{3, 3, 3}, 1},
{{-8, -1, -3}, 1},
}));
}))};

CAPTURE(test_input);

Expand All @@ -89,8 +89,8 @@ TEST_CASE("first_missing_positive") {
}

SECTION("Ten numbers") {
auto [test_input, expected_output]
= GENERATE(table<std::vector<int>, int>({
auto [test_input, expected_output]{
GENERATE(table<std::vector<int>, int>({
{{-1, -1, -1, -1, -1, -1, -1, -1, -1, 10}, 1},
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 1},
{{1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 2},
Expand All @@ -101,7 +101,7 @@ TEST_CASE("first_missing_positive") {
{{9, 7, 5, 4, 3, 2, 1, 1, 1, 0}, 6},
{{8, 20, 10, 6, 4, 3, 2, 1, -1, 0}, 5},
{{7, 11, 6, 6, -1, 4, 1, 2, 7, 2}, 3},
}));
}))};

CAPTURE(test_input);

Expand Down

0 comments on commit ec8fde8

Please sign in to comment.