Skip to content

Commit

Permalink
Move test case to Frame
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Oct 12, 2023
1 parent 8304e9c commit 7496b10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
2 changes: 2 additions & 0 deletions tests/unittests/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ TEST_CASE("Frame collections", "[frame][basics]") {
auto& coll = event.get<ExampleClusterCollection>("clusters");
REQUIRE(coll[0].energy() == 3.14f);
REQUIRE(coll[1].energy() == 42.0f);

REQUIRE_FALSE(event.get("non-existant"));
}

TEST_CASE("Frame parameters", "[frame][basics]") {
Expand Down
14 changes: 0 additions & 14 deletions tests/unittests/unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,6 @@ TEST_CASE("AutoDelete", "[basics][memory-management]") {
hit3 = hit2;
}

TEST_CASE("Basics", "[basics][memory-management]") {
auto store = podio::EventStore();
// Adding
auto& collection = store.create<ExampleHitCollection>("name");
auto hit1 = collection.create(0xcaffeeULL, 0., 0., 0., 0.); // initialize w/ value
auto hit2 = collection.create(); // default initialize
hit2.energy(12.5);
// Retrieving
const ExampleHitCollection* coll2(nullptr);
REQUIRE(store.get("name", coll2));
const ExampleHitCollection* coll3(nullptr);
REQUIRE_FALSE(store.get("wrongName", coll3));
}

TEST_CASE("Assignment-operator ref count", "[basics][memory-management]") {
// Make sure that the assignment operator handles the reference count
// correctly. (Will trigger in an ASan build if it is not the case)
Expand Down

0 comments on commit 7496b10

Please sign in to comment.