2 * Collects all TestCases in the Groovy test root that are written in Groovy.
4 * @author <a href="mailto:jeremy.rayner@bigfoot.com">Jeremy Rayner</a>
5 * @author Dierk Koenig (refactored to use AllTestSuite)
9 import groovy
.util
.AllTestSuite
;
10 import junit
.framework
.Test
;
11 import junit
.framework
.TestCase
;
12 import junit
.framework
.TestSuite
;
14 public class UberTestCaseGroovySourceRootPackage
extends TestCase
{
15 public static Test
suite() throws ClassNotFoundException
{
16 TestSuite suite
= (TestSuite
) AllTestSuite
.suite("src/test", "groovy/*Test.groovy");
18 String osName
= System
.getProperty("os.name");
19 if (osName
.equals("Linux") || osName
.equals("SunOS") || osName
.equals("Solaris") || osName
.equals("Mac OS X")) {
20 Class linuxTestClass
= Class
.forName("groovy.execute.ExecuteTest_LinuxSolaris");
21 suite
.addTestSuite(linuxTestClass
);
22 } else if (osName
.equals("Windows 2000") || osName
.equals("Windows 2003") || osName
.equals("Windows XP") || osName
.equals("Windows Vista")) {
23 Class windowsTestClass
= Class
.forName("groovy.execute.ExecuteTest_Windows");
24 suite
.addTestSuite(windowsTestClass
);
26 System
.err
.println("No execute tests for operating system: " + osName
+ "!!!");
33 // The following classes appear in target/test-classes but do not extend junit.framework.TestCase
35 // AnotherMockInputStream.class
39 // CallAnotherScript.class
40 // ClassWithScript.class
41 // ComparableFoo.class
50 // IntegerCategory.class
54 // MarkupTestScript.class
55 // MethodTestScript.class
56 // MockInputStream.class
64 // ScriptWithFunctions.class
66 // StringCategory.class
73 // UnitTestAsScript.class
74 // UseClosureInScript.class