From ec81a214d69ef92e44bd68f258f199b54b93cc71 Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Wed, 5 May 2021 23:25:55 +0200
Subject: [PATCH] coverage

---
 tests/framework/testGeometry.cpp       | 4 +++-
 tests/framework/testStackInterface.cpp | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/framework/testGeometry.cpp b/tests/framework/testGeometry.cpp
index 809ae5e13..a61a84519 100644
--- a/tests/framework/testGeometry.cpp
+++ b/tests/framework/testGeometry.cpp
@@ -30,7 +30,6 @@ double constexpr absMargin = 1.0e-8;
 TEST_CASE("Geometry CoordinateSystems") {
 
   logging::set_level(logging::level::info);
-  corsika_logger->set_pattern("[%n:%^%-8l%$] %v");
 
   CoordinateSystemPtr rootCS = get_root_CoordinateSystem();
 
@@ -66,6 +65,9 @@ TEST_CASE("Geometry CoordinateSystems") {
     Point p2(translatedCS, {0_m, 0_m, 0_m});
     CHECK(((p2 - p1).getComponents() - translationVector).getNorm().magnitude() ==
           Approx(0).margin(absMargin));
+    CHECK(p2.getX(rootCS) == 0_m);
+    CHECK(p2.getY(rootCS) == 4_m);
+    CHECK(p2.getZ(rootCS) == 0_m);
   }
 
   SECTION("multiple translations") {
diff --git a/tests/framework/testStackInterface.cpp b/tests/framework/testStackInterface.cpp
index a8d82894a..1bb77d166 100644
--- a/tests/framework/testStackInterface.cpp
+++ b/tests/framework/testStackInterface.cpp
@@ -83,7 +83,6 @@ TEST_CASE("Stack", "[Stack]") {
     stack.erase(p);
     CHECK(stack.getSize() == 1);
     CHECK(stack.getEntries() == 0);
-    CHECK_THROWS(stack.erase(p)); // already deleted
   }
 
   SECTION("delete particle") {
@@ -99,7 +98,8 @@ TEST_CASE("Stack", "[Stack]") {
     CHECK(stack.getEntries() == 3);
     CHECK(!stack.isEmpty());
 
-    p.erase(); // mark for deletion: size=3, entries=2
+    p.erase();               // mark for deletion: size=3, entries=2
+    CHECK_THROWS(p.erase()); // already deleted
     CHECK(stack.getSize() == 3);
     CHECK(stack.getEntries() == 2);
     CHECK(!stack.isEmpty());
-- 
GitLab