From e0cc7525b587abe88ee9e8e998e631dc1e72aac1 Mon Sep 17 00:00:00 2001 From: Jip Spel Date: Fri, 26 Oct 2018 16:09:23 +0200 Subject: [PATCH] Extend Lattice Test --- src/test/storm-pars/analysis/LatticeTest.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/test/storm-pars/analysis/LatticeTest.cpp b/src/test/storm-pars/analysis/LatticeTest.cpp index 14cd55c38..14a02675c 100644 --- a/src/test/storm-pars/analysis/LatticeTest.cpp +++ b/src/test/storm-pars/analysis/LatticeTest.cpp @@ -51,6 +51,10 @@ TEST(LatticeTest, Simple) { EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(6,3)); EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(6,4)); EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(6,5)); + + lattice.addRelationNodes(lattice.getNode(6), lattice.getNode(4)); + EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(6,4)); + } TEST(LatticeTest, copy_lattice) { @@ -68,6 +72,7 @@ TEST(LatticeTest, copy_lattice) { lattice.addBetween(6, lattice.getNode(5), lattice.getNode(3)); + auto latticeCopy = storm::analysis::Lattice(lattice); EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(0,1)); EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(1,0)); @@ -90,10 +95,12 @@ TEST(LatticeTest, copy_lattice) { EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(5,2)); EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(5,4)); + lattice.addRelationNodes(lattice.getNode(6), lattice.getNode(4)); + latticeCopy = storm::analysis::Lattice(lattice); EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(6,0)); EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(6,1)); - EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(6,2)); + EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(6,2)); EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(6,3)); - EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(6,4)); + EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(6,4)); EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(6,5)); -} \ No newline at end of file +}