378TEST(JaniParser, DieArrayExampleTest) {
379 std::pair<storm::jani::Model, std::vector<storm::jani::Property>> result;
382 EXPECT_TRUE(result.first.containsArrayVariables());
383 EXPECT_TRUE(result.first.hasGlobalVariable(
"sd"));
384 EXPECT_EQ(1ul, result.first.getNumberOfAutomata());
388 std::pair<storm::jani::Model, std::vector<storm::jani::Property>> result;
391 EXPECT_TRUE(result.first.containsArrayVariables());
392 EXPECT_TRUE(result.first.hasGlobalVariable(
"workstations_up"));
393 EXPECT_TRUE(result.first.hasGlobalVariable(
"workstations_up"));
394 EXPECT_EQ(6ul, result.first.getNumberOfAutomata());
395 EXPECT_TRUE(result.first.getAutomaton(
"Switch").hasVariable(
"id"));
396 EXPECT_TRUE(result.first.getAutomaton(
"Switch_1").hasVariable(
"id"));
397 EXPECT_TRUE(result.first.getAutomaton(
"Workstation").hasVariable(
"id"));
398 EXPECT_TRUE(result.first.getAutomaton(
"Workstation_1").hasVariable(
"id"));
399 EXPECT_TRUE(result.first.getAutomaton(1).hasVariable(
"id"));
402TEST(JaniParser, DieArrayNestedExampleTest) {
403 std::pair<storm::jani::Model, std::vector<storm::jani::Property>> result;
406 EXPECT_TRUE(result.first.containsArrayVariables());
407 EXPECT_TRUE(result.first.hasGlobalVariable(
"sd"));
408 EXPECT_EQ(1ul, result.first.getNumberOfAutomata());
411TEST(JaniParser, UnassignedVariablesTest) {
412 std::pair<storm::jani::Model, std::vector<storm::jani::Property>> result;
415 EXPECT_TRUE(result.first.hasConstant(
"c"));
416 EXPECT_EQ(2ul, result.first.getNumberOfAutomata());
419TEST(JaniParser, TrigonometryAndTranscendentalNumbersTest) {
420 std::pair<storm::jani::Model, std::vector<storm::jani::Property>> result;
422 auto& model = result.first;
423 auto& properties = result.second;
425 EXPECT_EQ(model.getNumberOfAutomata(), 1U);
426 EXPECT_EQ(properties.size(), 2U);
427 EXPECT_NO_THROW(model.substitute({},
true));
430TEST(JaniParser, MultiobjectiveTest) {
431 std::pair<storm::jani::Model, std::vector<storm::jani::Property>> result;
433 auto& model = result.first;
435 auto& properties = result.second;
436 ASSERT_EQ(properties.size(), 6U);
437 for (
size_t i = 0; i < properties.size(); ++i) {
438 auto const& f = properties[i].getRawFormula();
439 ASSERT_TRUE(f->isMultiObjectiveFormula()) <<
"Property #" << i <<
": " << *f;
441 EXPECT_EQ(i < 3, f->asMultiObjectiveFormula().isTradeoff()) <<
"Property #" << i <<
": " << *f;
442 EXPECT_EQ(i >= 3, f->asMultiObjectiveFormula().isLexicographic()) <<
"Property #" << i <<
": " << *f;
444 EXPECT_EQ(i == 0 || i == 3, f->asMultiObjectiveFormula().hasQualitativeResult()) <<
"Property #" << i <<
": " << *f;
446 EXPECT_EQ(i == 2 || i == 5, f->asMultiObjectiveFormula().hasMultiDimensionalResult()) <<
"Property #" << i <<
": " << *f;