1 package org.codehaus.groovy.antlr;
2
3 import groovy.util.GroovyTestCase;
4
5 public class GroovySourceASTTest extends GroovyTestCase {
6 GroovySourceAST a;
7 GroovySourceAST b;
8
9 protected void setUp() throws Exception {
10 a = new GroovySourceAST();
11 a.setLine(3);
12 a.setColumn(3);
13
14 b = new GroovySourceAST();
15 b.setLine(4);
16 b.setColumn(2);
17 }
18 public void testLessThan() throws Exception {
19 assertTrue(a.compareTo(b) < 0);
20 }
21 public void testEquality() throws Exception {
22 assertTrue(a.equals(a));
23 assertTrue(a.compareTo(a) == 0);
24 }
25 public void testGreaterThan() throws Exception {
26 assertTrue(b.compareTo(a) > 0);
27 }
28 }