Browse Source

Extend test

tempestpy_adaptions
Jip Spel 6 years ago
parent
commit
ae7d334171
  1. 33
      src/test/storm-pars/analysis/LatticeTest.cpp

33
src/test/storm-pars/analysis/LatticeTest.cpp

@ -23,7 +23,9 @@ TEST(LatticeTest, Simple) {
lattice.add(2);
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(0,2));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(2,0));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(2,1));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(1,2));
lattice.add(3);
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(2,3));
@ -31,29 +33,44 @@ TEST(LatticeTest, Simple) {
lattice.addToNode(4, lattice.getNode(2));
EXPECT_EQ(storm::analysis::Lattice::SAME, lattice.compare(2,4));
EXPECT_EQ(storm::analysis::Lattice::SAME, lattice.compare(4,2));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(0,4));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(4,0));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(4,1));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(1,4));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(4,3));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(3,4));
lattice.addBetween(5, lattice.getNode(0), lattice.getNode(3));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(5,0));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(0,5));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(5,3));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(3,5));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(5,1));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(1,5));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(5,2));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(2,5));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(5,4));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(4,5));
lattice.addBetween(6, lattice.getNode(5), lattice.getNode(3));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(6,0));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(0,6));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(6,1));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(1,6));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(6,2));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(2,6));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(6,3));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(3,6));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(6,4));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, lattice.compare(6,4));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(6,5));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(5,6));
lattice.addRelationNodes(lattice.getNode(6), lattice.getNode(4));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, lattice.compare(6,4));
EXPECT_EQ(storm::analysis::Lattice::BELOW, lattice.compare(4,6));
}
@ -78,29 +95,45 @@ TEST(LatticeTest, copy_lattice) {
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(1,0));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(0,2));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(2,0));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(2,1));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(1,2));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(2,3));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(3,2));
EXPECT_EQ(storm::analysis::Lattice::SAME, latticeCopy.compare(2,4));
EXPECT_EQ(storm::analysis::Lattice::SAME, latticeCopy.compare(4,2));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(0,4));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(4,0));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(4,1));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(1,4));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(4,3));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(3,4));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(5,0));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(0,5));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(5,3));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(3,5));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(5,1));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(1,5));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(5,2));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(5,2));
EXPECT_EQ(storm::analysis::Lattice::UNKNOWN, latticeCopy.compare(5,4));
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(0,6));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(6,1));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(1,6));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(6,2));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(2,6));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(6,3));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(3,6));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(6,4));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(4,6));
EXPECT_EQ(storm::analysis::Lattice::BELOW, latticeCopy.compare(6,5));
EXPECT_EQ(storm::analysis::Lattice::ABOVE, latticeCopy.compare(5,6));
}
Loading…
Cancel
Save