Beispiel #1
0
        public void TestEqualsWithMismatchedText() /*throws Exception*/
        {
            TreeWizard wiz  = new TreeWizard(adaptor, tokens);
            CommonTree t1   = (CommonTree)wiz.Create("(A B[foo] C)");
            CommonTree t2   = (CommonTree)wiz.Create("(A B C)");
            bool       same = TreeWizard.Equals(t1, t2, adaptor);

            Assert.IsTrue(!same);
        }
Beispiel #2
0
        public void TestEquals() /*throws Exception*/
        {
            TreeWizard wiz  = new TreeWizard(adaptor, tokens);
            CommonTree t1   = (CommonTree)wiz.Create("(A B C)");
            CommonTree t2   = (CommonTree)wiz.Create("(A B C)");
            bool       same = TreeWizard.Equals(t1, t2, adaptor);

            assertTrue(same);
        }