public void GetHashCodeTest() { SymbolComparer sc = new SymbolComparer(); Variable a = new Variable('a'); Variable b = new Variable('a'); Assert.AreEqual(sc.GetHashCode(a), sc.GetHashCode(b)); a = new Variable('a'); b = new Variable('b'); Assert.AreNotEqual(sc.GetHashCode(a), sc.GetHashCode(b)); }
public override int GetHashCode() { return(base.GetHashCode() * -1521134295 + SymbolComparer.GetHashCode(Constructor)); }