mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
WIP
This commit is contained in:
@ -1,8 +1,28 @@
|
||||
#include "FixedCapacityContainer.h"
|
||||
#include "catch.hpp"
|
||||
#include "TypeTraits.h"
|
||||
|
||||
#include <vector>
|
||||
#include <array>
|
||||
using sls::FixedCapacityContainer;
|
||||
|
||||
TEST_CASE("FixedCapacityContainer is a container"){
|
||||
REQUIRE(sls::is_container<FixedCapacityContainer<int,7>>::value == true);
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("Construct from vector"){
|
||||
std::vector<int> vec{1,2,3};
|
||||
FixedCapacityContainer<int, 5> 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);
|
||||
}
|
||||
|
||||
SCENARIO("FixedCapacityContainers can be sized and resized", "[support]") {
|
||||
|
||||
GIVEN("A default constructed container") {
|
||||
|
Reference in New Issue
Block a user