Browse Source

Small changes in tests to compile without Carl

Former-commit-id: 6ec191ce0a
tempestpy_adaptions
Mavo 8 years ago
parent
commit
5b8cf447c7
  1. 3
      test/functional/modelchecker/EigenDtmcPrctlModelCheckerTest.cpp
  2. 4
      test/functional/solver/EigenLinearEquationSolverTest.cpp

3
test/functional/modelchecker/EigenDtmcPrctlModelCheckerTest.cpp

@ -60,6 +60,7 @@ TEST(EigenDtmcPrctlModelCheckerTest, Die) {
EXPECT_NEAR(11.0 / 3.0, quantitativeResult4[0], storm::settings::getModule<storm::settings::modules::EigenEquationSolverSettings>().getPrecision());
}
#ifdef STORM_HAVE_CARL
TEST(EigenDtmcPrctlModelCheckerTest, Die_RationalNumber) {
storm::prism::Program program = storm::parser::PrismParser::parse(STORM_CPP_TESTS_BASE_PATH "/functional/builder/die.pm");
@ -159,7 +160,7 @@ TEST(EigenDtmcPrctlModelCheckerTest, Die_RationalFunction) {
EXPECT_EQ(storm::RationalNumber(11) / storm::RationalNumber(3), quantitativeResult4[0].evaluate(instantiation));
}
#endif
TEST(EigenDtmcPrctlModelCheckerTest, Crowds) {
std::shared_ptr<storm::models::sparse::Model<double>> abstractModel = storm::parser::AutoParser<>::parseModel(STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds5_5.tra", STORM_CPP_BASE_PATH "/examples/dtmc/crowds/crowds5_5.lab", "", "");

4
test/functional/solver/EigenLinearEquationSolverTest.cpp

@ -64,6 +64,7 @@ TEST(EigenLinearEquationSolver, SparseLU) {
ASSERT_LT(std::abs(x[2] - (-1)), storm::settings::getModule<storm::settings::modules::EigenEquationSolverSettings>().getPrecision());
}
#ifdef STORM_HAVE_CARL
TEST(EigenLinearEquationSolver, SparseLU_RationalNumber) {
ASSERT_NO_THROW(storm::storage::SparseMatrixBuilder<storm::RationalNumber> builder);
storm::storage::SparseMatrixBuilder<storm::RationalNumber> builder;
@ -115,6 +116,7 @@ TEST(EigenLinearEquationSolver, SparseLU_RationalFunction) {
ASSERT_TRUE(x[1] == storm::RationalFunction(3));
ASSERT_TRUE(x[2] == storm::RationalFunction(-1));
}
#endif
TEST(EigenLinearEquationSolver, DGMRES) {
ASSERT_NO_THROW(storm::storage::SparseMatrixBuilder<double> builder);
@ -412,4 +414,4 @@ TEST(EigenLinearEquationSolver, MatrixVectorMultiplication) {
storm::solver::EigenLinearEquationSolver<double> solver(A);
ASSERT_NO_THROW(solver.repeatedMultiply(x, nullptr, 4));
ASSERT_LT(std::abs(x[0] - 1), storm::settings::getModule<storm::settings::modules::EigenEquationSolverSettings>().getPrecision());
}
}
Loading…
Cancel
Save