diff --git a/tests/unittests/interface_types.cpp b/tests/unittests/interface_types.cpp index 723d4920d..59079a382 100644 --- a/tests/unittests/interface_types.cpp +++ b/tests/unittests/interface_types.cpp @@ -1,5 +1,7 @@ #include "catch2/catch_test_macros.hpp" +#include "datamodel/ExampleHit.h" +#include "datamodel/MutableExampleMC.h" #include "datamodel/ExampleHitCollection.h" #include "datamodel/MutableExampleCluster.h" #include "datamodel/TypeWithEnergy.h" @@ -70,9 +72,15 @@ TEST_CASE("InterfaceTypes STL usage", "[interface-types][basics]") { REQUIRE(counterMap[hit] == 2); REQUIRE(counterMap[wrapper] == 2); + auto mc = MutableExampleMC{}; + mc.energy() = 3.14f; + // check container of interfaces move constructor and direct initialization - auto interfaces = std::vector{}; - [[maybe_unused]] auto interfaces2 = std::vector{std::move(interfaces)}; + auto interfaces = std::vector{empty, hit, mc}; + auto interfaces2 = std::vector{std::move(interfaces)}; + REQUIRE_FALSE(interfaces2.at(0).isAvailable()); + REQUIRE(interfaces2.at(1).isA()); + REQUIRE(interfaces2.at(2).energy() == 3.14f); } TEST_CASE("InterfaceType from immutable", "[interface-types][basics]") {