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.

25 lines
803 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/NondeterministicModelParser.h"
  10. TEST(ParseMdpTest, parseAndOutput) {
  11. storm::models::Mdp<double> mdp = storm::parser::NondeterministicModelParserAsMdp(
  12. STORM_CPP_TESTS_BASE_PATH "/functional/parser/tra_files/mdp_general_input_01.tra",
  13. STORM_CPP_TESTS_BASE_PATH "/functional/parser/lab_files/pctl_general_input_01.lab");
  14. storm::storage::SparseMatrix<double> const& matrix = mdp.getTransitionMatrix();
  15. ASSERT_EQ(mdp.getNumberOfStates(), (uint_fast64_t)3);
  16. ASSERT_EQ(mdp.getNumberOfTransitions(), (uint_fast64_t)11);
  17. ASSERT_EQ(matrix.getRowCount(), (uint_fast64_t)(2 * 3));
  18. ASSERT_EQ(matrix.getColumnCount(), (uint_fast64_t)3);
  19. }