From 5b8cf447c7bb073450213be85bb9b1973bfedfb8 Mon Sep 17 00:00:00 2001 From: Mavo Date: Wed, 27 Jul 2016 10:02:08 +0200 Subject: [PATCH] Small changes in tests to compile without Carl Former-commit-id: 6ec191ce0af195317f83784bf758f4e26db36f13 --- .../modelchecker/EigenDtmcPrctlModelCheckerTest.cpp | 3 ++- test/functional/solver/EigenLinearEquationSolverTest.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/functional/modelchecker/EigenDtmcPrctlModelCheckerTest.cpp b/test/functional/modelchecker/EigenDtmcPrctlModelCheckerTest.cpp index 8caa788bb..b66c71f09 100644 --- a/test/functional/modelchecker/EigenDtmcPrctlModelCheckerTest.cpp +++ b/test/functional/modelchecker/EigenDtmcPrctlModelCheckerTest.cpp @@ -60,6 +60,7 @@ TEST(EigenDtmcPrctlModelCheckerTest, Die) { EXPECT_NEAR(11.0 / 3.0, quantitativeResult4[0], storm::settings::getModule().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> 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", "", ""); diff --git a/test/functional/solver/EigenLinearEquationSolverTest.cpp b/test/functional/solver/EigenLinearEquationSolverTest.cpp index 33d073c62..2cd90dc36 100644 --- a/test/functional/solver/EigenLinearEquationSolverTest.cpp +++ b/test/functional/solver/EigenLinearEquationSolverTest.cpp @@ -64,6 +64,7 @@ TEST(EigenLinearEquationSolver, SparseLU) { ASSERT_LT(std::abs(x[2] - (-1)), storm::settings::getModule().getPrecision()); } +#ifdef STORM_HAVE_CARL TEST(EigenLinearEquationSolver, SparseLU_RationalNumber) { ASSERT_NO_THROW(storm::storage::SparseMatrixBuilder builder); storm::storage::SparseMatrixBuilder 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 builder); @@ -412,4 +414,4 @@ TEST(EigenLinearEquationSolver, MatrixVectorMultiplication) { storm::solver::EigenLinearEquationSolver solver(A); ASSERT_NO_THROW(solver.repeatedMultiply(x, nullptr, 4)); ASSERT_LT(std::abs(x[0] - 1), storm::settings::getModule().getPrecision()); -} \ No newline at end of file +}