Skip to content

Commit

Permalink
Remove test case that no longer applies
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Oct 12, 2023
1 parent 7496b10 commit 4ede39c
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions tests/unittests/unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,6 @@ TEST_CASE("Assignment-operator ref count", "[basics][memory-management]") {
}
}

TEST_CASE("Clearing", "[UBSAN-FAIL][ASAN-FAIL][THREAD-FAIL][basics][memory-management]") {
auto store = podio::EventStore();
auto& hits = store.create<ExampleHitCollection>("hits");
auto& clusters = store.create<ExampleClusterCollection>("clusters");
auto& oneRels = store.create<ExampleWithOneRelationCollection>("OneRelation");
auto nevents = unsigned(1000);
for (unsigned i = 0; i < nevents; ++i) {
hits.clear();
clusters.clear();
auto hit1 = hits.create();
auto hit2 = ExampleHit();
hit1.energy(double(i));
auto cluster = clusters.create();
cluster.addHits(hit1);
cluster.addHits(hit2);
hits.push_back(hit2);
auto oneRel = MutableExampleWithOneRelation();
oneRel.cluster(cluster);
oneRel.cluster(cluster);
oneRels.push_back(oneRel);
}
hits.clear();
REQUIRE(hits.empty());
}

TEST_CASE("Cloning", "[basics][memory-management]") {
bool success = true;
auto hit = MutableExampleHit();
Expand Down Expand Up @@ -407,11 +382,6 @@ TEST_CASE("UserInitialization", "[basics][code-gen]") {
REQUIRE(ex.comp().arr[1] == 3.4);
}

TEST_CASE("NonPresentCollection", "[basics][event-store]") {
auto store = podio::EventStore();
REQUIRE_THROWS_AS(store.get<ExampleHitCollection>("NonPresentCollection"), std::runtime_error);
}

TEST_CASE("Collection size and empty", "[basics][collections]") {
ExampleClusterCollection coll{};
REQUIRE(coll.empty());
Expand All @@ -431,11 +401,7 @@ TEST_CASE("const correct indexed access to const collections", "[const-correctne
}

TEST_CASE("const correct indexed access to collections", "[const-correctness]") {
auto store = podio::EventStore();
auto& collection = store.create<ExampleHitCollection>("irrelevant name");

STATIC_REQUIRE(std::is_same_v<decltype(collection), ExampleHitCollection&>); // collection created by store should not
// be const
auto collection = ExampleHitCollection();

STATIC_REQUIRE(std::is_same_v<decltype(collection[0]), MutableExampleHit>); // non-const collections should have
// indexed access to mutable objects
Expand Down

0 comments on commit 4ede39c

Please sign in to comment.