You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
1002 B

  1. #include "gtest/gtest.h"
  2. #include "storm-config.h"
  3. #include "src/parser/PrismParser.h"
  4. #include "src/utility/solver.h"
  5. #ifdef STORM_HAVE_MSAT
  6. TEST(PrismProgramTest, FlattenModules) {
  7. storm::prism::Program result;
  8. ASSERT_NO_THROW(result = storm::parser::PrismParser::parse(STORM_CPP_TESTS_BASE_PATH "/functional/parser/prism/leader3.nm"));
  9. std::unique_ptr<storm::utility::solver::SmtSolverFactory> smtSolverFactory(new storm::utility::solver::MathsatSmtSolverFactory());
  10. ASSERT_NO_THROW(result = result.flattenModules(smtSolverFactory));
  11. EXPECT_EQ(1, result.getNumberOfModules());
  12. EXPECT_EQ(74, result.getModule(0).getNumberOfCommands());
  13. ASSERT_NO_THROW(result = storm::parser::PrismParser::parse(STORM_CPP_TESTS_BASE_PATH "/functional/parser/prism/wlan0_collide.nm"));
  14. ASSERT_NO_THROW(result = result.flattenModules(smtSolverFactory));
  15. EXPECT_EQ(1, result.getNumberOfModules());
  16. EXPECT_EQ(180, result.getModule(0).getNumberOfCommands());
  17. }
  18. #endif