|
@@ -57,7 +57,20 @@ TEST_CASE("pdevs/only_one", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a").
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_CONF).empty());
|
|
|
- for (unsigned int t = 0; t <= 10; ++t) {
|
|
|
+
|
|
|
+ // at t = 0
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 1);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 2);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::LAMBDA).size() == 1);
|
|
|
+
|
|
|
+ // at t > 0
|
|
|
+ for (unsigned int t = 1; t <= 10; ++t) {
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 2);
|
|
@@ -82,6 +95,9 @@ TEST_CASE("pdevs/flat", "run")
|
|
|
artis::common::Trace<DoubleTime>::trace().clear();
|
|
|
rc.run(context);
|
|
|
|
|
|
+ std::cout << artis::common::Trace<DoubleTime>::trace().elements().filter_level_type(
|
|
|
+ LevelType::USER).to_string() << std::endl;
|
|
|
+
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a1").
|
|
|
filter_function_type(artis::common::FunctionType::START).size() == 1);
|
|
@@ -98,7 +114,19 @@ TEST_CASE("pdevs/flat", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a1").
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_EXT).empty());
|
|
|
- for (unsigned int t = 0; t <= 10; ++t) {
|
|
|
+ // at t = 0
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a1").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 1);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a1").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 2);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a1").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::LAMBDA).size() == 1);
|
|
|
+
|
|
|
+ // at t > 0
|
|
|
+ for (unsigned int t = 1; t <= 10; ++t) {
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a1").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::LAMBDA).size() == 2);
|
|
@@ -117,15 +145,40 @@ TEST_CASE("pdevs/flat", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("b1").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 1);
|
|
|
- REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
- filter_model_name("b1").filter_time(t).
|
|
|
- filter_function_type(artis::common::FunctionType::TA).size() == 2);
|
|
|
+ if (t == 0) {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("b1").filter_time(t).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 3);
|
|
|
+ } else {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("b1").filter_time(t).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 2);
|
|
|
+ }
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("b1").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_EXT).size() == 1);
|
|
|
}
|
|
|
|
|
|
- for (unsigned int t = 0; t <= 10; ++t) {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_function_type(
|
|
|
+ artis::common::FunctionType::DELTA_CONF).empty());
|
|
|
+
|
|
|
+ // at t = 0
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::LAMBDA).size() == 2);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 2);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 4);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::DELTA_EXT).size() == 1);
|
|
|
+
|
|
|
+ // at t > 0
|
|
|
+ for (unsigned int t = 1; t <= 10; ++t) {
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a2").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::LAMBDA).size() == 3);
|
|
@@ -138,9 +191,6 @@ TEST_CASE("pdevs/flat", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a2").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_EXT).size() == 1);
|
|
|
- REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
- filter_model_name("a2").filter_time(t).
|
|
|
- filter_function_type(artis::common::FunctionType::DELTA_CONF).empty());
|
|
|
}
|
|
|
|
|
|
for (unsigned int t = 0; t <= 10; ++t) {
|
|
@@ -150,9 +200,15 @@ TEST_CASE("pdevs/flat", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("b2").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 2);
|
|
|
- REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
- filter_model_name("b2").filter_time(t).
|
|
|
- filter_function_type(artis::common::FunctionType::TA).size() == 4);
|
|
|
+ if (t == 0) {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("b2").filter_time(t).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 5);
|
|
|
+ } else {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("b2").filter_time(t).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 4);
|
|
|
+ }
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("b2").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_EXT).size() == 2);
|
|
@@ -187,7 +243,19 @@ TEST_CASE("pdevs/hierachical", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a1").
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_EXT).empty());
|
|
|
- for (unsigned int t = 0; t <= 10; ++t) {
|
|
|
+ // at t = 0
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a1").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 1);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a1").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 2);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a1").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::LAMBDA).size() == 1);
|
|
|
+
|
|
|
+ // at t > 0
|
|
|
+ for (unsigned int t = 1; t <= 10; ++t) {
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a1").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::LAMBDA).size() == 2);
|
|
@@ -206,15 +274,40 @@ TEST_CASE("pdevs/hierachical", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("b1").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 1);
|
|
|
- REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
- filter_model_name("b1").filter_time(t).
|
|
|
- filter_function_type(artis::common::FunctionType::TA).size() == 2);
|
|
|
+ if (t == 0) {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("b1").filter_time(t).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 3);
|
|
|
+ } else {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("b1").filter_time(t).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 2);
|
|
|
+ }
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("b1").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_EXT).size() == 1);
|
|
|
}
|
|
|
|
|
|
- for (unsigned int t = 0; t <= 10; ++t) {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_function_type(
|
|
|
+ artis::common::FunctionType::DELTA_CONF).empty());
|
|
|
+
|
|
|
+ // at t = 0
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::LAMBDA).size() == 2);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 2);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 4);
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("a2").filter_time(0).
|
|
|
+ filter_function_type(artis::common::FunctionType::DELTA_EXT).size() == 1);
|
|
|
+
|
|
|
+ // at t > 0
|
|
|
+ for (unsigned int t = 1; t <= 10; ++t) {
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a2").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::LAMBDA).size() == 3);
|
|
@@ -227,9 +320,6 @@ TEST_CASE("pdevs/hierachical", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("a2").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_EXT).size() == 1);
|
|
|
- REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
- filter_model_name("a2").filter_time(t).
|
|
|
- filter_function_type(artis::common::FunctionType::DELTA_CONF).empty());
|
|
|
}
|
|
|
|
|
|
for (unsigned int t = 0; t <= 10; ++t) {
|
|
@@ -239,9 +329,15 @@ TEST_CASE("pdevs/hierachical", "run")
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("b2").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_INT).size() == 2);
|
|
|
- REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
- filter_model_name("b2").filter_time(t).
|
|
|
- filter_function_type(artis::common::FunctionType::TA).size() == 4);
|
|
|
+ if (t == 0) {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("b2").filter_time(t).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 5);
|
|
|
+ } else {
|
|
|
+ REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
+ filter_model_name("b2").filter_time(t).
|
|
|
+ filter_function_type(artis::common::FunctionType::TA).size() == 4);
|
|
|
+ }
|
|
|
REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
|
|
|
filter_model_name("b2").filter_time(t).
|
|
|
filter_function_type(artis::common::FunctionType::DELTA_EXT).size() == 2);
|