Esempio 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);
        }
Esempio 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);
        }