Ejemplo n.º 1
0
        public void ShouldNotEquals()
        {
            ZeroOrMore a, b;


            a      = new ZeroOrMore();
            a.Item = new Terminal('a');
            b      = new ZeroOrMore();
            b.Item = new Terminal('b');

            Assert.IsFalse(a.Equals(b));
            Assert.IsFalse(a.Equals(null));
            Assert.IsFalse(a.Equals(new AnyTerminal()));
            Assert.IsFalse(a.Equals(new EOS()));
        }
Ejemplo n.º 2
0
        public void ShouldEquals()
        {
            ZeroOrMore a, b;


            a      = new ZeroOrMore();
            a.Item = new Terminal('a');
            b      = new ZeroOrMore();
            b.Item = new Terminal('a');

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