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.

31 lines
1.3 KiB

  1. #include "gtest/gtest.h"
  2. #include "storm-config.h"
  3. #include "src/parser/PrismParser.h"
  4. //#include "src/utility/IoUtility.h"
  5. #include "src/ir/Program.h"
  6. #include "src/adapters/ExplicitModelAdapter.h"
  7. #include "src/models/Dtmc.h"
  8. #include "src/models/Mdp.h"
  9. TEST(ParsePrismTest, parseCrowds5_5) {
  10. storm::ir::Program program;
  11. ASSERT_NO_THROW(program = storm::parser::PrismParserFromFile(STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds5_5.pm"));
  12. storm::adapters::ExplicitModelAdapter adapter(program);
  13. std::shared_ptr<storm::models::Dtmc<double>> model = adapter.getModel()->as<storm::models::Dtmc<double>>();
  14. ASSERT_EQ(model->getNumberOfStates(), (uint_fast64_t)8607);
  15. ASSERT_EQ(model->getNumberOfTransitions(), (uint_fast64_t)15113);
  16. }
  17. TEST(ParsePrismTest, parseTwoDice) {
  18. storm::ir::Program program;
  19. ASSERT_NO_THROW(program = storm::parser::PrismParserFromFile(STORM_CPP_BASE_PATH "/examples/mdp/two_dice/two_dice.nm"));
  20. storm::adapters::ExplicitModelAdapter adapter(program);
  21. std::shared_ptr<storm::models::Mdp<double>> model = adapter.getModel()->as<storm::models::Mdp<double>>();
  22. ASSERT_EQ(model->getNumberOfStates(), (uint_fast64_t)169);
  23. ASSERT_EQ(model->getNumberOfChoices(), (uint_fast64_t)254);
  24. ASSERT_EQ(model->getNumberOfTransitions(), (uint_fast64_t)436);
  25. }