This commit is contained in:
Erik Frojdh
2019-08-12 17:17:13 +02:00
parent b52a8d2d61
commit 935f7bc960
3 changed files with 52 additions and 22 deletions

View File

@ -17,12 +17,39 @@ TEST_CASE("Construct from vector"){
REQUIRE(fcc == vec);
}
TEST_CASE("Copy construct from vector"){
std::vector<int> vec{1,2,3};
FixedCapacityContainer<int, 5> fcc = vec;
REQUIRE(fcc == vec);
}
TEST_CASE("Copy assignment from vector"){
std::vector<int> vec{1,2,3};
FixedCapacityContainer<int, 5> fcc;
fcc = vec;
REQUIRE(fcc == vec);
}
TEST_CASE("Construct from array"){
std::array<int,3> arr{1,2,3};
FixedCapacityContainer<int, 5> fcc{arr};
REQUIRE(fcc == arr);
}
TEST_CASE("Copy assign from array"){
std::array<int,3> arr{1,2,3};
FixedCapacityContainer<int, 5> fcc;
fcc = arr;
REQUIRE(fcc == arr);
}
TEST_CASE("Copy construct from array"){
std::array<int,3> arr{1,2,3};
FixedCapacityContainer<int, 5> fcc = arr;
REQUIRE(fcc == arr);
}
SCENARIO("FixedCapacityContainers can be sized and resized", "[support]") {
GIVEN("A default constructed container") {