Skip to content

Commit 5f639bd

Browse files
committed
Add test for using range to concat const collections
This commit is added in order to test the fix from the previous commit, because it is good to test things.
1 parent 1eb3c28 commit 5f639bd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

unit/util/range.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ SCENARIO("range tests", "[core][util][range]")
7676
REQUIRE(odds == expected_odds);
7777
}
7878
}
79+
GIVEN("Two const vectors of ints")
80+
{
81+
const std::vector<int> input1{1, 2};
82+
const std::vector<int> input2{3, 4};
83+
THEN("Concat the vectors using range.")
84+
{
85+
auto range = make_range(input1).concat(make_range(input2));
86+
const std::vector<int> output{range.begin(), range.end()};
87+
const std::vector<int> expected{1, 2, 3, 4};
88+
REQUIRE(output == expected);
89+
};
90+
}
7991
}
8092

8193
class move_onlyt

0 commit comments

Comments
 (0)