IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 86766153 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

Merge branch '199-add-unit-tests-for-switchprocess-in-processsequence' into 'master'

Resolve "Add unit-tests for SwitchProcess in ProcessSequence"

Closes #199

See merge request AirShowerPhysics/corsika!137
parents 98942571 eb3e53ec
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,7 @@ target_link_libraries ( ...@@ -47,6 +47,7 @@ target_link_libraries (
CORSIKA_ADD_TEST(testProcessSequence) CORSIKA_ADD_TEST(testProcessSequence)
target_link_libraries ( target_link_libraries (
testProcessSequence testProcessSequence
ProcessSwitch
CORSIKAsetup CORSIKAsetup
CORSIKAgeometry CORSIKAgeometry
CORSIKAprocesssequence CORSIKAprocesssequence
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <iostream> #include <iostream>
#include <corsika/process/ProcessSequence.h> #include <corsika/process/ProcessSequence.h>
#include <corsika/process/switch_process/SwitchProcess.h>
using namespace corsika; using namespace corsika;
using namespace corsika::units::si; using namespace corsika::units::si;
...@@ -291,3 +292,15 @@ TEST_CASE("Process Sequence", "[Process Sequence]") { ...@@ -291,3 +292,15 @@ TEST_CASE("Process Sequence", "[Process Sequence]") {
CHECK(s2.GetCount() == 10); CHECK(s2.GetCount() == 10);
} }
} }
/*
Note: there is a fine-grained dedicated test-suite for SwitchProcess
in Processes/SwitchProcess/testSwtichProcess
*/
TEST_CASE("SwitchProcess") {
Process1 p1(0);
Process2 p2(0);
switch_process::SwitchProcess s(p1, p2, 10_GeV);
REQUIRE(is_switch_process_v<decltype(s)>);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment