Example #1
0
        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));
        }
Example #2
0
 public override int GetHashCode()
 {
     return(base.GetHashCode() * -1521134295 +
            SymbolComparer.GetHashCode(Constructor));
 }