db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r436817 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang: LangScripts.java _Suite.java
Date Fri, 25 Aug 2006 14:37:38 GMT
Author: djd
Date: Fri Aug 25 07:37:38 2006
New Revision: 436817

URL: http://svn.apache.org/viewvc?rev=436817&view=rev
Log:
Add some the JUnit test LnagScripts to the lang._Suite suite to start testing of running the
.sql
scripts using JUnit. Currently it runs up to about eight test depending on configuration.
These
tests do not currently replace the running of the scripts as regulaar tests.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangScripts.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangScripts.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangScripts.java?rev=436817&r1=436816&r2=436817&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangScripts.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangScripts.java
Fri Aug 25 07:37:38 2006
@@ -28,20 +28,32 @@
 public final class LangScripts extends ScriptTestCase {
 	
 	/**
-	 * All the langauge SQL scripts to be run as JUnit tests.
+	 * Language SQL scripts that run under all configurations.
 	 */
 	private static final String[] SQL_LANGUAGE_TESTS = {
-		"arithmetic",
-		"bit2",
 		"case",
 		"constantExpression",
-		"depend",
-		"derived",
-		"union",
 		};
-	
+
+    /**
+     * Language SQL scripts that run under Derby's clients configurations.
+     */
+    private static final String[] DERBY_TESTS = {
+        "bit2",
+        "derived",
+        };
+    
+    /**
+     * Language SQL scripts that only run in embedded.
+     */
+    private static final String[] EMBEDDED_TESTS = {
+        "arithmetic",
+        "depend",
+        "union",
+        };	
+
 	/**
-	 * Run a set of langauge SQL scripts passed in on the
+	 * Run a set of language SQL scripts passed in on the
 	 * command line.
 	 * <code>
 	 * example
@@ -57,7 +69,16 @@
 	 * Return the suite that runs all the langauge SQL scripts.
 	 */
 	public static Test suite() {
-    	return getSuite(SQL_LANGUAGE_TESTS);
+        TestSuite suite = new TestSuite();
+        suite.addTest(getSuite(SQL_LANGUAGE_TESTS));
+        
+        if (usingEmbedded() || usingDerbyNetClient())
+            suite.addTest(getSuite(DERBY_TESTS));
+        
+        if (usingEmbedded())
+            suite.addTest(getSuite(EMBEDDED_TESTS));
+        
+        return suite;
     }
     
 	/*

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java?rev=436817&r1=436816&r2=436817&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
Fri Aug 25 07:37:38 2006
@@ -30,6 +30,12 @@
 /**
  * Suite to run all JUnit tests in this package:
  * org.apache.derbyTesting.functionTests.tests.lang
+ * <P>
+ * All tests are run "as-is", just as if they were run
+ * individually. Thus this test is just a collection
+ * of all the JUNit tests in this package (excluding itself).
+ * While the old test harness is in use, some use of decorators
+ * may be required.
  *
  */
 public class _Suite extends BaseTestCase  {
@@ -52,7 +58,7 @@
         // suite.addTest(largeCodeGen.suite());
 
 		// suite.addTest(PrepareExecuteDDL.suite());
-		// suite.addTest(LangScripts.suite());
+		suite.addTest(LangScripts.suite());
 		
 		// Tests that are compiled using 1.4 target need to
 		// be added this way, otherwise creating the suite



Mime
View raw message