Ejemplo n.º 1
0
        public static void TestEqualIntegerConstantTokens()
        {
            Token firstToken  = new IntegerConstantToken(42);
            Token secondToken = new IntegerConstantToken(42);

            bool equals = firstToken.Equals(secondToken);

            Assert.True(equals);
        }
Ejemplo n.º 2
0
        public static void TestDifferentTypeTokens()
        {
            Token firstToken  = new IntegerConstantToken(42);
            Token secondToken = new StringConstantToken("42");

            bool equals         = firstToken.Equals(secondToken);
            bool otherWayEquals = secondToken.Equals(firstToken);

            Assert.False(equals);
            Assert.False(otherWayEquals);
        }