示例#1
0
        public void ShouldNotEquals()
        {
            ExceptTerminal a, b;


            a = new ExceptTerminal('a');
            b = new ExceptTerminal('b');

            Assert.IsFalse(a.Equals(b));
            Assert.IsFalse(b.Equals(null));
            Assert.IsFalse(b.Equals(new AnyTerminal()));
            Assert.IsFalse(b.Equals(new EOS()));
        }
示例#2
0
        public void ShouldEquals()
        {
            ExceptTerminal a, b;


            a = new ExceptTerminal('a');
            b = new ExceptTerminal('a');

            Assert.IsTrue(a.Equals(b));
            Assert.IsTrue(b.Equals(a));
        }