From 55fdcff2c77df5038a58768c7b38a39bc680714a Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Tue, 27 Apr 2021 11:44:46 +0200
Subject: [PATCH] improve coverage

---
 tests/framework/testCombinedStack.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tests/framework/testCombinedStack.cpp b/tests/framework/testCombinedStack.cpp
index 7d01f3fcd..8cd13dd85 100644
--- a/tests/framework/testCombinedStack.cpp
+++ b/tests/framework/testCombinedStack.cpp
@@ -218,6 +218,17 @@ TEST_CASE("Combined Stack", "[stack]") {
     CHECK(s.getEntries() == 0);
     CHECK(s.isEmpty());
   }
+
+  
+  SECTION("exceptions") {
+    StackTest s;
+    auto p1 = s.addParticle(std::tuple{9.9});
+    auto p2 = s.addParticle(std::tuple{9.9});
+    ++p2;
+    CHECK_THROWS(s.copy(p1, p2));
+    CHECK_THROWS(s.swap(p1, p2));
+    CHECK(s.getSize() == 2);   
+  }
 }
 
 ////////////////////////////////////////////////////////////
@@ -288,7 +299,6 @@ using StackTest2 = CombinedStack<typename StackTest::stack_implementation_type,
 TEST_CASE("Combined Stack - multi", "[stack]") {
 
   logging::set_level(logging::level::info);
-  corsika_logger->set_pattern("[%n:%^%-8l%$] custom pattern: %v");
 
   SECTION("create secondaries") {
 
-- 
GitLab