use of de.bmoth.modelchecker.State in project bmoth by hhu-stups.
the class StateTest method testStateEquals.
@Test
public void testStateEquals() throws Exception {
HashMap<String, Expr> map1 = new HashMap<>();
HashMap<String, Expr> map2 = new HashMap<>();
map1.put("x", z3Context.mkInt(11));
map2.put("x", z3Context.mkInt(11));
State state1 = new State(map1);
State state2 = new State(map2);
assertEquals(state1, state2);
assertEquals(state1.hashCode(), state2.hashCode());
}
use of de.bmoth.modelchecker.State in project bmoth by hhu-stups.
the class StateTest method testEquals.
@Test
public void testEquals() {
HashMap<String, Expr> map = new HashMap<>();
map.put("a", z3Context.mkInt(1));
map.put("b", z3Context.mkInt(2));
State s = new State(map);
State s2 = new State(map);
assertEqualsImplementedCorrectly(s);
assertEqualsImplementedCorrectly(s, s2);
s2 = new State(map);
State s3 = new State(map);
assertEqualsImplementedCorrectly(s2);
assertEqualsImplementedCorrectly(s2, s3);
}
use of de.bmoth.modelchecker.State in project bmoth by hhu-stups.
the class StateTest method testStateEquals2.
@Test
public void testStateEquals2() throws Exception {
HashMap<String, Expr> map1 = new HashMap<>();
HashMap<String, Expr> map2 = new HashMap<>();
map1.put("x", z3Context.mkInt(11));
map1.put("y", z3Context.mkInt(12));
map2.put("x", z3Context.mkInt(11));
State state1 = new State(map1);
State state2 = new State(map2);
assertNotEquals(state1, state2);
assertNotEquals(state1.hashCode(), state2.hashCode());
}