From 8870fa5f9439e2a9c76bbf9b1da08d22b17e32f0 Mon Sep 17 00:00:00 2001 From: dehnert Date: Tue, 12 Mar 2013 13:15:45 +0100 Subject: [PATCH] Changed all existing examples to 0-based indexing. Also, fixed the tests for these examples. --- .../GmmxxDtmcPrctModelCheckerTest.cpp | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/functional/GmmxxDtmcPrctModelCheckerTest.cpp b/test/functional/GmmxxDtmcPrctModelCheckerTest.cpp index 7d4161e8e..3050b3e49 100644 --- a/test/functional/GmmxxDtmcPrctModelCheckerTest.cpp +++ b/test/functional/GmmxxDtmcPrctModelCheckerTest.cpp @@ -14,8 +14,8 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Die) { std::shared_ptr> dtmc = parser.getModel>(); - ASSERT_EQ(dtmc->getNumberOfStates(), 14); - ASSERT_EQ(dtmc->getNumberOfTransitions(), 28); + ASSERT_EQ(dtmc->getNumberOfStates(), 13); + ASSERT_EQ(dtmc->getNumberOfTransitions(), 27); storm::modelChecker::GmmxxDtmcPrctlModelChecker mc(*dtmc); @@ -25,7 +25,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Die) { std::vector* result = probFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - ((double)1/6)), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - ((double)1/6)), s->get("precision")); delete probFormula; delete result; @@ -36,7 +36,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Die) { result = probFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - ((double)1/6)), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - ((double)1/6)), s->get("precision")); delete probFormula; delete result; @@ -47,7 +47,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Die) { result = probFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - ((double)1/6)), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - ((double)1/6)), s->get("precision")); delete probFormula; delete result; @@ -59,7 +59,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Die) { result = rewardFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - ((double)11/3)), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - ((double)11/3)), s->get("precision")); delete rewardFormula; delete result; @@ -74,8 +74,8 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Crowds) { std::shared_ptr> dtmc = parser.getModel>(); - ASSERT_EQ(dtmc->getNumberOfStates(), 8608); - ASSERT_EQ(dtmc->getNumberOfTransitions(), 22461); + ASSERT_EQ(dtmc->getNumberOfStates(), 8607); + ASSERT_EQ(dtmc->getNumberOfTransitions(), 22460); storm::modelChecker::GmmxxDtmcPrctlModelChecker mc(*dtmc); @@ -85,7 +85,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Crowds) { std::vector* result = probFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - 0.3328800375801578281), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - 0.3328800375801578281), s->get("precision")); delete probFormula; delete result; @@ -96,7 +96,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Crowds) { result = probFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - 0.1522173670950556501), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - 0.1522173670950556501), s->get("precision")); delete probFormula; delete result; @@ -107,7 +107,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, Crowds) { result = probFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - 0.32153724292835045), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - 0.32153724292835045), s->get("precision")); delete probFormula; delete result; @@ -122,8 +122,8 @@ TEST(GmmxxDtmcPrctModelCheckerTest, SynchronousLeader) { std::shared_ptr> dtmc = parser.getModel>(); - ASSERT_EQ(dtmc->getNumberOfStates(), 12401); - ASSERT_EQ(dtmc->getNumberOfTransitions(), 28895); + ASSERT_EQ(dtmc->getNumberOfStates(), 12400); + ASSERT_EQ(dtmc->getNumberOfTransitions(), 28894); storm::modelChecker::GmmxxDtmcPrctlModelChecker mc(*dtmc); @@ -133,7 +133,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, SynchronousLeader) { std::vector* result = probFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - 1), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - 1), s->get("precision")); delete probFormula; delete result; @@ -144,7 +144,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, SynchronousLeader) { result = probFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - 0.9999965911265462636), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - 0.9999965911265462636), s->get("precision")); delete probFormula; delete result; @@ -155,7 +155,7 @@ TEST(GmmxxDtmcPrctModelCheckerTest, SynchronousLeader) { result = rewardFormula->check(mc); - ASSERT_LT(std::abs((*result)[1] - 1.0448979591835938496), s->get("precision")); + ASSERT_LT(std::abs((*result)[0] - 1.0448979591835938496), s->get("precision")); delete rewardFormula; delete result;