jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1521941 - in /jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql: ./ algebra/ algebra/optimize/ core/ engine/binding/ expr/ function/user/ lang/ modify/ syntax/ util/
Date Wed, 11 Sep 2013 17:09:43 GMT
Author: andy
Date: Wed Sep 11 17:09:43 2013
New Revision: 1521941

URL: http://svn.apache.org/r1521941
Log:
Tidy testing. Use JUnit4 style whereever possible.

Modified:
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/ARQTestSuite.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestClassify.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestVarFinder.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilters.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestContext.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetGraphMem.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TS_Expr.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions2.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestFunctions2.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeFunctions.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeValue.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestOrdering.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestRegex.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestXSDFuncOp.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/function/user/TS_UserFunctions.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/lang/TestEsc.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMem.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMgtMem.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TS_Util.java
    jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TestList.java

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/ARQTestSuite.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/ARQTestSuite.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/ARQTestSuite.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/ARQTestSuite.java Wed Sep 11
17:09:43 2013
@@ -48,6 +48,9 @@ public class ARQTestSuite extends TestSu
     
     static public TestSuite suite()
     {
+        // We have to do things JUnit3 style in order to
+        // have scripted tests, which use JUnit3-style dynamic test building.
+        // This does not seem to be possible in org.junit.*
         TestSuite ts = new ARQTestSuite() ;
         
         // No warnings (e.g. bad lexical forms).

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestClassify.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestClassify.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestClassify.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestClassify.java Wed
Sep 11 17:09:43 2013
@@ -18,8 +18,7 @@
 
 package com.hp.hpl.jena.sparql.algebra;
 
-import junit.framework.JUnit4TestAdapter ;
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.query.Query ;
@@ -30,19 +29,8 @@ import com.hp.hpl.jena.sparql.algebra.op
 import com.hp.hpl.jena.sparql.engine.main.JoinClassifier ;
 import com.hp.hpl.jena.sparql.engine.main.LeftJoinClassifier ;
 
-public class TestClassify extends TestCase
+public class TestClassify extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestClassify.class) ;
-    }
-//    public static Test suite()
-//    {
-//        TestSuite ts = new TestSuite(TestClassify.class) ;
-//        ts.setName(Utils.classShortName(TestClassify.class)) ;
-//        return ts ;
-//    }
-
     @Test public void testClassify_Join_01() 
 	{ classifyJ("{?s :p :o . { ?s :p :o FILTER(true) } }", true) ; }
 

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestVarFinder.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestVarFinder.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestVarFinder.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/TestVarFinder.java Wed
Sep 11 17:09:43 2013
@@ -23,7 +23,6 @@ import java.util.HashSet ;
 import java.util.List ;
 import java.util.Set ;
 
-import junit.framework.JUnit4TestAdapter ;
 import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
@@ -33,11 +32,6 @@ import com.hp.hpl.jena.sparql.sse.SSE ;
 
 public class TestVarFinder extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestVarFinder.class) ;
-    }
-    
     @Test public void varfind_01_1() { varfindFixed("(bgp (?s <p> <o>))", "s")
; }
     @Test public void varfind_01_2() { varfindOpt("(bgp (?s <p> <o>))") ; }
     @Test public void varfind_01_3() { varfindFilter("(bgp (?s <p> <o>))") ;
}

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilters.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilters.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilters.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestTransformFilters.java
Wed Sep 11 17:09:43 2013
@@ -18,7 +18,6 @@
 
 package com.hp.hpl.jena.sparql.algebra.optimize;
 
-import junit.framework.JUnit4TestAdapter ;
 import org.apache.jena.atlas.lib.StrUtils ;
 import org.junit.Assert ;
 import org.junit.Test ;
@@ -33,11 +32,6 @@ import com.hp.hpl.jena.sparql.sse.SSE ;
 /** Tests of transforms related to filters */
 public class TestTransformFilters
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestTransformFilters.class) ;
-    }
-    
     private Transform t_equality    = new TransformFilterEquality() ;
     private Transform t_disjunction = new TransformFilterDisjunction() ;
     private Transform t_placement   = new TransformFilterPlacement() ;

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/algebra/optimize/TestVarRename.java
Wed Sep 11 17:09:43 2013
@@ -21,7 +21,6 @@ package com.hp.hpl.jena.sparql.algebra.o
 import java.util.HashSet ;
 import java.util.Set ;
 
-import junit.framework.JUnit4TestAdapter ;
 import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
@@ -35,11 +34,6 @@ import com.hp.hpl.jena.sparql.sse.SSE ;
 
 public class TestVarRename extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestVarRename.class) ;
-    }
-
     @Test public void rename_01() { rename("(bgp (<s> <p> <o>))", "(bgp
(<s> <p> <o>))", true) ; }
     @Test public void rename_02() { rename("(bgp (<s> ?p <o>))", "(bgp (<s>
?/p <o>))", true) ; }
     @Test public void rename_03() { rename("(bgp (?s ?p <o>))", "(bgp (?s ?/p <o>))",
true, "s") ; }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestContext.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestContext.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestContext.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestContext.java Wed Sep
11 17:09:43 2013
@@ -18,29 +18,16 @@
 
 package com.hp.hpl.jena.sparql.core;
 
-import junit.framework.JUnit4TestAdapter ;
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.sparql.util.Context ;
 import com.hp.hpl.jena.sparql.util.Symbol ;
 
-public class TestContext extends TestCase
+public class TestContext extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestContext.class) ;
-    }
-//    
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestContext.class) ;
-//        ts.setName("TestContext") ;
-//        return ts ;
-//    }
-    
-    Symbol p1 = Symbol.create("p1") ;
-    Symbol p2 = Symbol.create("p2") ;
+    static Symbol p1 = Symbol.create("p1") ;
+    static Symbol p2 = Symbol.create("p2") ;
     
     @Test public void testCxt1() { Context cxt = new Context(); }
     

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetGraphMem.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetGraphMem.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetGraphMem.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/core/TestDatasetGraphMem.java
Wed Sep 11 17:09:43 2013
@@ -18,15 +18,9 @@
 
 package com.hp.hpl.jena.sparql.core;
 
-import junit.framework.JUnit4TestAdapter ;
 
 public class TestDatasetGraphMem extends AbstractDatasetGraphTests
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestDatasetGraphMem.class) ;
-    }
-    
     @Override
     public DatasetGraph emptyDataset()
     {

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/engine/binding/TestBindingStreams.java
Wed Sep 11 17:09:43 2013
@@ -23,7 +23,6 @@ import java.io.ByteArrayOutputStream ;
 import java.util.ArrayList ;
 import java.util.List ;
 
-import junit.framework.JUnit4TestAdapter ;
 import org.apache.jena.atlas.junit.BaseTest ;
 import org.apache.jena.riot.RiotException ;
 import org.apache.jena.riot.system.PrefixMap;
@@ -47,11 +46,6 @@ import com.hp.hpl.jena.sparql.util.NodeU
 
 public class TestBindingStreams extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestBindingStreams.class) ;
-    }
-    
     @BeforeClass public static void beforeClass()
     { 
         setTestLogging() ;

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TS_Expr.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TS_Expr.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TS_Expr.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TS_Expr.java Wed Sep 11
17:09:43 2013
@@ -18,7 +18,6 @@
 
 package com.hp.hpl.jena.sparql.expr;
 
-import junit.framework.JUnit4TestAdapter ;
 import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
 import org.junit.runner.RunWith ;
@@ -62,9 +61,4 @@ public class TS_Expr
         NodeValue.VerboseWarnings = bVerboseWarnings ;
         E_Function.WarnOnUnknownFunction = bWarnOnUnknownFunction ;
     }
-    
-    
-      public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(TS_Expr.class);
-      }
 }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions.java Wed
Sep 11 17:09:43 2013
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertTru
 import java.math.BigDecimal ;
 import java.math.BigInteger ;
 
-import junit.framework.JUnit4TestAdapter ;
 import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;
@@ -54,10 +53,6 @@ public class TestExpressions
     public final static int PARSE_FAIL    = 250 ;   // Parser should catch it.
     public final static int EVAL_FAIL     = 200 ;   // Parser should pass it but eval should
fail it
     
-    public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(TestExpressions.class);
-      }
-    
     static boolean flagVerboseWarning ;
     @BeforeClass static public void beforeClass() {  
         flagVerboseWarning = NodeValue.VerboseWarnings ;
@@ -66,7 +61,6 @@ public class TestExpressions
     
     @AfterClass static public void afterClass() { NodeValue.VerboseWarnings = flagVerboseWarning
; }
     
-    
     @Test public void testVar_1() { testVar("?x", "x") ; }
     @Test public void testVar_2() { testVar("$x", "x") ; }
     @Test public void testVar_3() { testVar("?name", "name") ; }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions2.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions2.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions2.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestExpressions2.java Wed
Sep 11 17:09:43 2013
@@ -18,7 +18,7 @@
 
 package com.hp.hpl.jena.sparql.expr;
 
-import org.junit.Assert ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.query.QueryParseException ;
@@ -31,7 +31,7 @@ import com.hp.hpl.jena.sparql.util.ExprU
 * @see TestExprLib
 * @see TestNodeValue
 */
-public class TestExpressions2 extends Assert
+public class TestExpressions2 extends BaseTest
 {
     
     @Test public void gregorian_eq_01()         { eval("'1999'^^xsd:gYear = '1999'^^xsd:gYear",
true) ; }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestFunctions2.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestFunctions2.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestFunctions2.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestFunctions2.java Wed
Sep 11 17:09:43 2013
@@ -18,25 +18,22 @@
 
 package com.hp.hpl.jena.sparql.expr;
 
+import org.apache.jena.atlas.junit.BaseTest ;
+import org.junit.AfterClass ;
+import org.junit.BeforeClass ;
+import org.junit.Test ;
+
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.shared.PrefixMapping ;
 import com.hp.hpl.jena.sparql.ARQConstants ;
-import com.hp.hpl.jena.sparql.expr.Expr ;
-import com.hp.hpl.jena.sparql.expr.ExprEvalException ;
-import com.hp.hpl.jena.sparql.expr.NodeValue ;
 import com.hp.hpl.jena.sparql.function.FunctionEnvBase ;
 import com.hp.hpl.jena.sparql.util.ExprUtils ;
 import com.hp.hpl.jena.sparql.util.NodeFactoryExtra ;
 
-import org.apache.jena.atlas.junit.BaseTest ;
-import org.junit.AfterClass ;
-import org.junit.BeforeClass ;
-import org.junit.Test ;
-
 public class TestFunctions2 extends BaseTest
 {
     // 3->2
-    // Some overlap with TestFunctions except those are direct function calls and tehse are
via SPARQl 1.1 syntax.
+    // Some overlap with TestFunctions except those are direct function calls and these are
via SPARQL 1.1 syntax.
     // Better too many tests than too few.
     
     static boolean warnOnBadLexicalForms = true ; 

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeFunctions.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeFunctions.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeFunctions.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeFunctions.java Wed
Sep 11 17:09:43 2013
@@ -18,8 +18,7 @@
 
 package com.hp.hpl.jena.sparql.expr;
 
-import junit.framework.JUnit4TestAdapter ;
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.datatypes.xsd.XSDDatatype ;
@@ -29,13 +28,8 @@ import com.hp.hpl.jena.sparql.expr.nodev
 import com.hp.hpl.jena.sparql.graph.NodeConst ;
 import com.hp.hpl.jena.vocabulary.XSD ;
 
-public class TestNodeFunctions extends TestCase
+public class TestNodeFunctions extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestNodeFunctions.class) ;
-    }
-    
     private static final double accuracyExact = 0.0d ;
     private static final double accuracyClose = 0.000001d ;
     

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeValue.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeValue.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeValue.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestNodeValue.java Wed Sep
11 17:09:43 2013
@@ -23,7 +23,7 @@ import java.util.Calendar ;
 import java.util.GregorianCalendar ;
 import java.util.TimeZone ;
 
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.datatypes.xsd.XSDDatatype ;
@@ -36,7 +36,7 @@ import com.hp.hpl.jena.sparql.util.NodeF
  * @see TestExprLib
  * @see TestNodeValue
  */
-public class TestNodeValue extends TestCase
+public class TestNodeValue extends BaseTest
 {
     static final double doubleAccuracy = 0.00000001d ;
 

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestOrdering.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestOrdering.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestOrdering.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestOrdering.java Wed Sep
11 17:09:43 2013
@@ -18,8 +18,7 @@
 
 package com.hp.hpl.jena.sparql.expr;
 
-import junit.framework.JUnit4TestAdapter ;
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.datatypes.xsd.XSDDatatype ;
@@ -27,13 +26,8 @@ import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.graph.NodeFactory ;
 import com.hp.hpl.jena.sparql.util.NodeUtils ;
 
-public class TestOrdering extends TestCase
+public class TestOrdering extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestOrdering.class) ;
-    }
-    
     NodeValue nvInt2 = NodeValue.makeNodeInteger(2) ;
     NodeValue nvInt3 = NodeValue.makeNodeInteger("3") ;
     NodeValue nvInt03 = NodeValue.makeNodeInteger("03") ;

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestRegex.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestRegex.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestRegex.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestRegex.java Wed Sep 11
17:09:43 2013
@@ -18,33 +18,21 @@
 
 package com.hp.hpl.jena.sparql.expr;
 
-import junit.framework.JUnit4TestAdapter ;
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
+import org.junit.BeforeClass ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.query.ARQ ;
 import com.hp.hpl.jena.sparql.engine.binding.BindingFactory ;
 
-/** com.hp.hpl.jena.query.test.TestMisc */
-
-public class TestRegex extends TestCase
+public class TestRegex extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
+    @BeforeClass
+    public static void beforeClass() {
         if ( false )
             ARQ.getContext().set(ARQ.regexImpl, ARQ.xercesRegex) ;
-        return new JUnit4TestAdapter(TestRegex.class) ;
     }
     
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestRegex.class) ;
-//        ts.setName("TestRegex") ;
-//        if ( false )
-//            ARQ.getContext().set(ARQ.regexImpl, ARQ.xercesRegex) ;
-//        return ts ;
-//    }
-    
     @Test public void testRegex1() { regexTest("ABC", "ABC", null, true) ; }
     @Test public void testRegex2() { regexTest("ABC", "abc", null, false) ; }
     @Test public void testRegex3() { regexTest("ABC", "abc", "", false) ; }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestXSDFuncOp.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestXSDFuncOp.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestXSDFuncOp.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/expr/TestXSDFuncOp.java Wed Sep
11 17:09:43 2013
@@ -29,23 +29,11 @@ import com.hp.hpl.jena.sparql.expr.nodev
 
 public class TestXSDFuncOp extends BaseTest
 {
-//    public static junit.framework.Test suite()
-//    {
-//        return new JUnit4TestAdapter(TestXSDFuncOp.class) ;
-//    }
-    
     private static final double accuracyExact_D = 0.0d ;
     private static final double accuracyExact_F = 0.0d ;
     private static final double accuracyClose_D = 0.000001d ;
     private static final double accuracyClose_F = 0.000001f ;
     
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestXSDFuncOp.class) ;
-//        ts.setName(Utils.classShortName(TestXSDFuncOp.class)) ;
-//        return ts ;
-//    }
-
     // These add tests also test that the right kind of operation was done.
     
     @Test public void testAddIntegerInteger()

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/function/user/TS_UserFunctions.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/function/user/TS_UserFunctions.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/function/user/TS_UserFunctions.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/function/user/TS_UserFunctions.java
Wed Sep 11 17:09:43 2013
@@ -18,15 +18,11 @@
 
 package com.hp.hpl.jena.sparql.function.user;
 
-import junit.framework.JUnit4TestAdapter;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-import com.hp.hpl.jena.sparql.expr.TS_Expr;
+import org.junit.AfterClass ;
+import org.junit.BeforeClass ;
+import org.junit.runner.RunWith ;
+import org.junit.runners.Suite ;
+import org.junit.runners.Suite.SuiteClasses ;
 
 @RunWith(Suite.class)
 @SuiteClasses( {
@@ -50,8 +46,4 @@ public class TS_UserFunctions {
 	public static void teardown() {
 		UserDefinedFunctionDefinition.warnOnUnusedVariable = bWarnOnUnusedVar;
 	}
-    
-    public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(TS_Expr.class);
-      }
 }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/lang/TestEsc.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/lang/TestEsc.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/lang/TestEsc.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/lang/TestEsc.java Wed Sep 11
17:09:43 2013
@@ -18,29 +18,13 @@
 
 package com.hp.hpl.jena.sparql.lang;
 
-import junit.framework.JUnit4TestAdapter ;
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.query.QueryParseException ;
-import com.hp.hpl.jena.sparql.lang.ParserBase ;
 
-/** com.hp.hpl.jena.query.test.TestMisc */
-
-public class TestEsc extends TestCase
+public class TestEsc extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestEsc.class) ;
-    }
-    
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestEsc.class) ;
-//        ts.setName(Utils.classShortName(TestEsc.class)) ;
-//        return ts ;
-//    }
-    
     @Test public void testEsc01() { execTest("x\\uabcd", "x\uabcd") ; }
     @Test public void testEsc02() { execTest("\\uabcdx", "\uabcdx") ; }
     @Test public void testEsc03() { execTest("1234\\uabcd1234", "1234\uabcd1234") ; }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMem.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMem.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMem.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMem.java
Wed Sep 11 17:09:43 2013
@@ -18,18 +18,11 @@
 
 package com.hp.hpl.jena.sparql.modify;
 
-import junit.framework.JUnit4TestAdapter ;
-
 import com.hp.hpl.jena.update.GraphStore ;
 import com.hp.hpl.jena.update.GraphStoreFactory ;
 
 public class TestUpdateGraphMem extends AbstractTestUpdateGraph
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestUpdateGraphMem.class) ;
-    }
-    
     @Override
     protected GraphStore getEmptyGraphStore()
     {

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMgtMem.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMgtMem.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMgtMem.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/modify/TestUpdateGraphMgtMem.java
Wed Sep 11 17:09:43 2013
@@ -18,18 +18,11 @@
 
 package com.hp.hpl.jena.sparql.modify;
 
-import junit.framework.JUnit4TestAdapter ;
-
 import com.hp.hpl.jena.update.GraphStore ;
 import com.hp.hpl.jena.update.GraphStoreFactory ;
 
 public class TestUpdateGraphMgtMem extends AbstractTestUpdateGraphMgt
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestUpdateGraphMgtMem.class) ;
-    }
-    
     @Override
     protected GraphStore getEmptyGraphStore()
     {

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java
(original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/syntax/TestSerialization.java
Wed Sep 11 17:09:43 2013
@@ -18,8 +18,7 @@
 
 package com.hp.hpl.jena.sparql.syntax;
 
-import junit.framework.JUnit4TestAdapter ;
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.query.Query ;
@@ -33,20 +32,8 @@ import com.hp.hpl.jena.sparql.sse.SSE ;
 import com.hp.hpl.jena.sparql.util.FmtUtils ;
 
 
-public class TestSerialization extends TestCase
+public class TestSerialization extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestSerialization.class) ;
-    }
-    
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestSerialization.class) ;
-//        ts.setName(Utils.classShortName(TestSerialization.class)) ;
-//        return ts ;
-//    }
-    
     static PrefixMapping pmap1 = new PrefixMappingImpl() ;
     {
         pmap1.setNsPrefix("", "http://default/") ;

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TS_Util.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TS_Util.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TS_Util.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TS_Util.java Wed Sep 11
17:09:43 2013
@@ -18,7 +18,6 @@
 
 package com.hp.hpl.jena.sparql.util;
 
-import junit.framework.JUnit4TestAdapter ;
 import org.junit.runner.RunWith ;
 import org.junit.runners.Suite ;
 import org.junit.runners.Suite.SuiteClasses ;
@@ -31,8 +30,4 @@ import org.junit.runners.Suite.SuiteClas
 })
 
 public class TS_Util
-{
-      public static junit.framework.Test suite() {
-        return new JUnit4TestAdapter(TS_Util.class);
-      }
-}
+{ }

Modified: jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TestList.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TestList.java?rev=1521941&r1=1521940&r2=1521941&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TestList.java (original)
+++ jena/trunk/jena-arq/src/test/java/com/hp/hpl/jena/sparql/util/TestList.java Wed Sep 11
17:09:43 2013
@@ -21,16 +21,11 @@ package com.hp.hpl.jena.sparql.util;
 import java.io.StringReader ;
 import java.util.List ;
 
-import junit.framework.JUnit4TestAdapter ;
-import junit.framework.TestCase ;
+import org.apache.jena.atlas.junit.BaseTest ;
 import org.junit.Test ;
 
 import com.hp.hpl.jena.datatypes.xsd.XSDDatatype ;
-import com.hp.hpl.jena.graph.Factory ;
-import com.hp.hpl.jena.graph.Graph ;
-import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.graph.NodeFactory ;
-import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.graph.* ;
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.rdf.model.ModelFactory ;
 import com.hp.hpl.jena.sparql.util.graph.GNode ;
@@ -38,20 +33,8 @@ import com.hp.hpl.jena.sparql.util.graph
 import com.hp.hpl.jena.vocabulary.RDF ;
 
 /** Test the graph-level RDF list support used in SPARQL */
-public class TestList extends TestCase
+public class TestList extends BaseTest
 {
-    public static junit.framework.Test suite()
-    {
-        return new JUnit4TestAdapter(TestList.class) ;
-    }
-    
-//    public static TestSuite suite()
-//    {
-//        TestSuite ts = new TestSuite(TestList.class) ;
-//        ts.setName(Utils.classShortName(TestList.class)) ;
-//        return ts ;
-//    }
-    
     private GNode emptyList = parse(listStr_1) ; 
     private GNode list4 = parse(listStr_2) ;
     private GNode list22 = parse(listStr_3) ;



Mime
View raw message