SymbolicValue { @Override public int hashCode() { return 31 * id; } SymbolicValue(); @Override int hashCode(); @Override boolean equals(Object o); static boolean isDisposable(SymbolicValue symbolicValue); boolean references(SymbolicValue other); @Override String toString(); void computedFrom(List<ProgramState.SymbolicValueSymbol> symbolicValues); List<Symbol> computedFromSymbols(); List<SymbolicValue> computedFrom(); List<ProgramState> setConstraint(ProgramState programState, ObjectConstraint nullConstraint); List<ProgramState> setConstraint(ProgramState programState, BooleanConstraint booleanConstraint); List<ProgramState> setConstraint(ProgramState programState, Constraint constraint); ProgramState setSingleConstraint(ProgramState programState, ObjectConstraint nullConstraint); SymbolicValue wrappedValue(); static final SymbolicValue NULL_LITERAL; static final SymbolicValue TRUE_LITERAL; static final SymbolicValue FALSE_LITERAL; static final List<SymbolicValue> PROTECTED_SYMBOLIC_VALUES; }
@Test void test_hashCode_equals() throws Exception { SymbolicValue sv1 = new SymbolicValue(); SymbolicValue sv2 = new SymbolicValue(); assertThat(sv1) .isEqualTo(sv1) .isNotEqualTo(null) .isNotEqualTo(new Object()) .isNotEqualTo(sv2); assertThat(sv1.hashCode()).isNotEqualTo(sv2.hashCode()); }