jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/3] jena git commit: Organize tests systematically
Date Sun, 05 Aug 2018 15:49:13 GMT
Organize tests systematically


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/3271b8cd
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/3271b8cd
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/3271b8cd

Branch: refs/heads/master
Commit: 3271b8cd422f6cf61791fba1e53290daac2c0f7b
Parents: 71acf2c
Author: Andy Seaborne <andy@apache.org>
Authored: Fri Aug 3 16:34:19 2018 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Fri Aug 3 16:35:44 2018 +0100

----------------------------------------------------------------------
 .../jena/reasoner/rulesys/TestRuleUtil.java     |  7 +++++++
 .../rulesys/impl/TestLPBRuleEngine.java         |  2 +-
 .../rulesys/impl/TestLPBRuleEngineLeak.java     |  2 +-
 .../jena/reasoner/rulesys/test/TestPackage.java | 22 +++++++++++---------
 .../test/TestRestrictionsDontNeedTyping.java    |  6 ++++++
 5 files changed, 27 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/3271b8cd/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/TestRuleUtil.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/TestRuleUtil.java b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/TestRuleUtil.java
index e22568b..4d303d4 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/TestRuleUtil.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/TestRuleUtil.java
@@ -26,8 +26,15 @@ import java.math.BigInteger;
 import org.apache.jena.datatypes.xsd.XSDDatatype;
 import org.apache.jena.graph.Node;
 import org.apache.jena.graph.NodeFactory;
+import org.apache.jena.reasoner.rulesys.test.TestComparatorBuiltins;
 import org.junit.Test;
 
+/**
+ * Tests more of comparison in org.apache.jena.reasoner.rulesys.Util/
+ * These tests must run in the same package - calls a package visible function.
+ * 
+ * @see TestComparatorBuiltins
+ */
 public class TestRuleUtil {
     @Test public void cmp1() {
         compare("1", XSDDatatype.XSDdecimal, "2", XSDDatatype.XSDdecimal, -1);

http://git-wip-us.apache.org/repos/asf/jena/blob/3271b8cd/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngine.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngine.java
b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngine.java
index e7a061f..fd940dd 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngine.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngine.java
@@ -41,7 +41,7 @@ import org.apache.jena.vocabulary.RDFS;
 
 public class TestLPBRuleEngine extends TestCase {
 	public static TestSuite suite() {
-		return new TestSuite(TestLPBRuleEngine.class, "TestLPBRuleEngine");
+		return new TestSuite(TestLPBRuleEngine.class);
 	}
 
 	protected Node a = NodeFactory.createURI("a");

http://git-wip-us.apache.org/repos/asf/jena/blob/3271b8cd/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngineLeak.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngineLeak.java
b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngineLeak.java
index 58e0afb..2dcfee1 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngineLeak.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/impl/TestLPBRuleEngineLeak.java
@@ -41,7 +41,7 @@ import org.apache.jena.vocabulary.RDFS;
 
 public class TestLPBRuleEngineLeak extends TestCase {
 	public static TestSuite suite() {
-		return new TestSuite(TestLPBRuleEngineLeak.class, "TestLPBRuleEngineLeak");
+		return new TestSuite(TestLPBRuleEngineLeak.class);
 	}
 
 	protected Node a = NodeFactory.createURI("a");

http://git-wip-us.apache.org/repos/asf/jena/blob/3271b8cd/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestPackage.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestPackage.java
b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestPackage.java
index c2aeb3f..49b3cb9 100755
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestPackage.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestPackage.java
@@ -42,27 +42,29 @@ public class TestPackage extends TestSuite {
     /** Creates new TestPackage */
     private TestPackage() {
         super("RuleSys");
-        addTest(new JUnit4TestAdapter(TestRuleUtil.class));
-
+        
         addTestSuite( TestConfigVocabulary.class );
         addTestSuite( TestGenericRuleReasonerConfig.class );
         addTest( "TestBasics", TestBasics.suite() );
+        
+        addTest( "TestComparatorBuiltins", TestComparatorBuiltins.suite() );
+        addTest( new JUnit4TestAdapter(TestRuleUtil.class));
+
         addTest( "TestBackchainer", TestBackchainer.suite() );
         addTest( "TestLPBasics", TestBasicLP.suite() );
+
         addTest( "TestLPDerivation", TestLPDerivation.suite() );
-        addTest( TestLPBRuleEngine.suite() );
+        addTest( "TestLPBRuleEngine", TestLPBRuleEngine.suite() );
         addTest( "TestFBRules", TestFBRules.suite() );
         addTest( "TestGenericRules", TestGenericRules.suite() );
         addTest( "TestRETE", TestRETE.suite() );
-        addTest( TestSetRules.suite() );
-        addTest( TestLPBRuleEngineLeak.suite() );
+        addTest( "TestSetRules", TestSetRules.suite() );
+        addTest( "TestLPBRuleEngineLeak", TestLPBRuleEngineLeak.suite() );
         addTest( "OWLRuleUnitTests", OWLUnitTest.suite() );
         addTest( "TestBugs", TestBugs.suite() );
         addTest( "TestOWLMisc", TestOWLMisc.suite() );
-        addTest( "TestComparatorBuiltins", TestComparatorBuiltins.suite() );
         addTest( "FRuleEngineIFactoryTest", FRuleEngineIFactoryTest.suite() );
-        // Must reside in same package as util.
-        addTest(new JUnit4TestAdapter(TestRuleUtil.class));
+        
         //addTest ("TestRuleLoader", TestRuleLoader.suite() );
 
         try {
@@ -75,8 +77,8 @@ public class TestPackage extends TestSuite {
         } catch (Throwable t) {
             logger.warn("Skipping concurrency test, JVM doesn't seem to support fileDeadlockedThreads");
         }
-        addTestSuite( TestInferenceReification.class );
-        addTestSuite( TestRestrictionsDontNeedTyping.class );
+        addTest( "TestInferenceReification", TestInferenceReification.suite() );
+        addTest( "TestRestrictionsDontNeedTyping", TestRestrictionsDontNeedTyping.suite()
);
 
         // No longer needed because the tests are now subsumed in OWLUnitTest
         // addTest( "TestOWLConsistency", TestOWLRules.suite() );

http://git-wip-us.apache.org/repos/asf/jena/blob/3271b8cd/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRestrictionsDontNeedTyping.java
----------------------------------------------------------------------
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRestrictionsDontNeedTyping.java
b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRestrictionsDontNeedTyping.java
index aba72dd..f188565 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRestrictionsDontNeedTyping.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRestrictionsDontNeedTyping.java
@@ -18,6 +18,7 @@
 
 package org.apache.jena.reasoner.rulesys.test;
 
+import junit.framework.TestSuite;
 import org.apache.jena.ontology.* ;
 import org.apache.jena.rdf.model.* ;
 import org.apache.jena.rdf.model.test.ModelTestBase ;
@@ -31,6 +32,11 @@ import org.apache.jena.vocabulary.* ;
 */
 public class TestRestrictionsDontNeedTyping extends ModelTestBase
     {
+    
+    public static TestSuite suite() {
+        return new TestSuite( TestRestrictionsDontNeedTyping.class ); 
+    } 
+    
     static final Property ANY = null;
     
     public TestRestrictionsDontNeedTyping( String name )


Mime
View raw message