Revision: 15162
          http://gate.svn.sourceforge.net/gate/?rev=15162&view=rev
Author:   markagreenwood
Date:     2012-01-21 13:19:31 +0000 (Sat, 21 Jan 2012)
Log Message:
-----------
updated to JUnit 4.10 -- we can now use annotations to create tests, which 
personally I find much nicer than the old JUnit 3.x way of naming methods (just 
be crafeul not to mix the two within the same class as that way leads to 
badness)

Modified Paths:
--------------
    gate/trunk/build.xml
    gate/trunk/lib/junit.jar
    gate/trunk/src/gate/TestGate.java

Modified: gate/trunk/build.xml
===================================================================
--- gate/trunk/build.xml        2012-01-21 12:50:09 UTC (rev 15161)
+++ gate/trunk/build.xml        2012-01-21 13:19:31 UTC (rev 15162)
@@ -863,22 +863,6 @@
     <antcall target="test.reports" />
   </target>
 
-  <target name="guitest" depends="plugins.build">
-    <java classname="junit.swingui.TestRunner"
-          classpathref="run.class.path"
-          fork="true"
-          spawn="false"
-          dir="."
-          logError="true"
-          maxmemory="${runtime.max.memory}">
-       <sysproperty key="gate.home" value="${basedir}"/>
-       <sysproperty key="gate.config" value="${buildDir}/gate.xml"/>
-       <sysproperty key="load.plugin.path" 
value="file:${basedir}/plugins/ANNIE;file:${basedir}/plugins/Information_Retrieval;file:${basedir}/plugins/Machine_Learning;file:${basedir}/plugins/Obsolete;file:${basedir}/plugins/Ontology_Tools;file:${basedir}/plugins/Tools;file:${basedir}/plugins/WordNet"/>
-       <syspropertyset refid="run.properties" />
-      <arg value="gate.TestGate"/>
-     </java>
-  </target>
-
   <!-- Make the archives for the GATE Distribution -->
   <target name="distro-zips"
           depends="prepare, compile, jar, doc, plugins.build, 
plugins.distro.prepare">

Modified: gate/trunk/lib/junit.jar
===================================================================
(Binary files differ)

Modified: gate/trunk/src/gate/TestGate.java
===================================================================
--- gate/trunk/src/gate/TestGate.java   2012-01-21 12:50:09 UTC (rev 15161)
+++ gate/trunk/src/gate/TestGate.java   2012-01-21 13:19:31 UTC (rev 15162)
@@ -54,7 +54,6 @@
 import gate.util.TestTools;
 import gate.xml.TestRepositioningInfo;
 import gate.xml.TestXml;
-import gnu.getopt.Getopt;
 
 import java.io.File;
 import java.lang.reflect.Method;
@@ -101,94 +100,6 @@
   /** Status flag for error exit. */
   private static final int STATUS_ERROR = 1;
 
-  /** Main routine for the GATE test suite.
-    * Command-line arguments:
-    * <UL>
-    * <LI>
-    * <B>-a</B> means run the test runner in automatic class reload mode
-    * <LI>
-    * <B>-n</B> means assume there's no net connection
-    * <LI>
-    * <B>-t</B> means run the test runner in text mode
-    * (useful for
-    * debugging, as there's less confusion to do with threads and
-    * class loaders).
-    * <LI>
-    * <B>-i file</B> additional initialisation file (probably called
-    *   <TT>gate.xml</TT>). Used for site-wide initialisation by the
-    *   start-up scripts.
-    * </UL>
-    */
-  public static void main(String[] args) throws Exception {
-    boolean textMode = false;
-    boolean autoloadingMode = false;
-
-    // process command-line options
-    Getopt g = new Getopt("GATE test suite", args, "tnNasi:");
-    int c;
-    while( (c = g.getopt()) != -1 )
-      switch(c) {
-        case 't':
-          textMode = true;
-          break;
-        case 'n':
-          Gate.setNetConnected(false);
-          break;
-        case 'N':
-          Gate.setNetConnected(false);
-          Gate.setLocalWebServer(false);
-          break;
-        case 'a':
-          autoloadingMode = true;
-          break;
-        // -i gate.xml site-wide init file
-        case 'i':
-          String optionString = g.getOptarg();
-          URL u = null;
-          File f = new File(optionString);
-          try {
-            u = f.toURI().toURL();
-          } catch(MalformedURLException e) {
-            Err.prln("Bad initialisation file: " + optionString);
-            Err.prln(e);
-            System.exit(STATUS_ERROR);
-          }
-          Gate.setSiteConfigFile(f);
-          Out.prln(
-            "Initialisation file " + optionString +
-            " recorded for initialisation"
-          );
-          break;
-        case '?':
-          // leave the warning to getopt
-          return;
-        default:
-          Err.prln("getopt() returned " + c + "\n");
-      } // switch
-
-    // set up arguments for the JUnit test runner
-    String junitArgs[] = new String[2];
-    junitArgs[0] = "-noloading";
-    junitArgs[1] = "gate.TestGate";
-
-    // use the next line if you're running with output to console in text mode:
-    // junitArgs[1] = "-wait";
-
-    // execute the JUnit test runner
-    if(textMode) { // text runner mode
-      junit.textui.TestRunner.main(junitArgs);
-    } else if(autoloadingMode) { // autoloading mode
-      junitArgs[0] = "gate.TestGate";
-      junitArgs[1] = "";
-
-      junit.swingui.TestRunner.main(junitArgs);
-
-    } else { // by default us the single-run GUI version
-      junit.swingui.TestRunner.main(junitArgs);
-    }
-
-  } // main
-
   /** GATE test suite. Every test case class has to be
     * registered here.
     */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to