|
Groovy example source code file (GroovySourceASTTest.java)
The Groovy GroovySourceASTTest.java source code
package org.codehaus.groovy.antlr;
import groovy.util.GroovyTestCase;
public class GroovySourceASTTest extends GroovyTestCase {
GroovySourceAST a;
GroovySourceAST b;
protected void setUp() throws Exception {
a = new GroovySourceAST();
a.setLine(3);
a.setColumn(3);
b = new GroovySourceAST();
b.setLine(4);
b.setColumn(2);
}
public void testLessThan() throws Exception {
assertTrue(a.compareTo(b) < 0);
}
public void testEquality() throws Exception {
assertTrue(a.equals(a));
assertTrue(a.compareTo(a) == 0);
}
public void testGreaterThan() throws Exception {
assertTrue(b.compareTo(a) > 0);
}
}
Other Groovy examples (source code examples)Here is a short list of links related to this Groovy GroovySourceASTTest.java source code file: |
Other websites by Alvin Alexander:
Life/living in Alaska (OneMansAlaska.com)
How I Sold My Business (HowISoldMyBusiness.com)
Copyright 1998-2011 Alvin Alexander, devdaily.com
All Rights Reserved.