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.

32 lines
874 B

  1. /*
  2. * ParseMdpTest.cpp
  3. *
  4. * Created on: 14.01.2013
  5. * Author: Thomas Heinemann
  6. */
  7. #include "gtest/gtest.h"
  8. #include "storm-config.h"
  9. #include "src/parser/MdpParser.h"
  10. #include "src/utility/IoUtility.h"
  11. TEST(ParseMdpTest, parseAndOutput) {
  12. storm::parser::MdpParser* mdpParser;
  13. ASSERT_NO_THROW(mdpParser = new storm::parser::MdpParser(
  14. STORM_CPP_TESTS_BASE_PATH "/parser/tra_files/mdp_general_input_01.tra",
  15. STORM_CPP_TESTS_BASE_PATH "/parser/lab_files/pctl_general_input_01.lab"));
  16. std::shared_ptr<storm::models::Mdp<double>> mdp = mdpParser->getMdp();
  17. std::shared_ptr<storm::storage::SparseMatrix<double>> matrix = mdp->getTransitionProbabilityMatrix();
  18. ASSERT_EQ(mdp->getNumberOfStates(), 3);
  19. ASSERT_EQ(mdp->getNumberOfTransitions(), 11);
  20. ASSERT_EQ(matrix->getRowCount(), 2 * 3);
  21. ASSERT_EQ(matrix->getColumnCount(), 3);
  22. delete mdpParser;
  23. }