db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r179227 - in /incubator/jdo/trunk/tck20: maven.xml project.properties project.xml test/java/org/apache/jdo/tck/enhancement/FieldAccessModified.java.fix test/java/org/apache/jdo/tck/enhancement/ImplementsPersistenceCapable.java.fix
Date Tue, 31 May 2005 16:00:22 GMT
Author: mcaisse
Date: Tue May 31 09:00:20 2005
New Revision: 179227

URL: http://svn.apache.org/viewcvs?rev=179227&view=rev
Log:
JDO-1 Enhancer tests now compile. Fix by M. Watzek

Modified:
    incubator/jdo/trunk/tck20/maven.xml
    incubator/jdo/trunk/tck20/project.properties
    incubator/jdo/trunk/tck20/project.xml
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/FieldAccessModified.java.fix
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/ImplementsPersistenceCapable.java.fix

Modified: incubator/jdo/trunk/tck20/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/maven.xml?rev=179227&r1=179226&r2=179227&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/maven.xml (original)
+++ incubator/jdo/trunk/tck20/maven.xml Tue May 31 09:00:20 2005
@@ -416,6 +416,8 @@
         <pathelement location="${bcel.jarfile}" />
         <pathelement location="${log4j.jarfile}" />
         <pathelement location="${derby.jarfile}" />
+        <pathelement location="${core20.jarfile}" />
+        <pathelement location="${enhancer20.jarfile}" />
     </path>
 
     <!-- ==== -->

Modified: incubator/jdo/trunk/tck20/project.properties
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/project.properties?rev=179227&r1=179226&r2=179227&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/project.properties (original)
+++ incubator/jdo/trunk/tck20/project.properties Tue May 31 09:00:20 2005
@@ -60,6 +60,8 @@
 log4j.jarfile = ${pom.getDependencyPath('log4j')}
 derby.jarfile = ${pom.getDependencyPath('derby:derby')}
 derbytools.jarfile = ${pom.getDependencyPath('derby:derbytools')}
+core20.jarfile = ${pom.getDependencyPath('apache-jdo:jdo2-core')}
+enhancer20.jarfile = ${pom.getDependencyPath('apache-jdo:jdo2-enhancer')}
 xmlparser =
 
 # JDORI enhancer

Modified: incubator/jdo/trunk/tck20/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/project.xml?rev=179227&r1=179226&r2=179227&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/project.xml (original)
+++ incubator/jdo/trunk/tck20/project.xml Tue May 31 09:00:20 2005
@@ -94,6 +94,16 @@
             <artifactId>derbytools</artifactId>
             <version>10.0.2.1</version>
         </dependency>
+        <dependency>
+            <groupId>apache-jdo</groupId>
+            <artifactId>jdo2-enhancer</artifactId>
+            <version>SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>apache-jdo</groupId>
+            <artifactId>jdo2-core</artifactId>
+            <version>SNAPSHOT</version>
+        </dependency>
     </dependencies>
     <!-- =================== -->
     <!-- Build Specification -->

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/FieldAccessModified.java.fix
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/FieldAccessModified.java.fix?rev=179227&r1=179226&r2=179227&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/FieldAccessModified.java.fix
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/FieldAccessModified.java.fix
Tue May 31 09:00:20 2005
@@ -1,107 +0,0 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at 
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License.
- */
-
-package org.apache.jdo.tck.enhancement;
-
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.jdo.impl.enhancer.util.AnnotationTest;
-import org.apache.jdo.tck.util.BatchTestRunner;
-
-/**
- *<B>Title:</B> FieldAccessModified
- *<BR>
- *<B>Keywords:</B> enhancement
- *<BR>
- *<B>Assertion ID:</B> .
- *<BR>
- *<B>Assertion Description: </B>
-The enhancer modifies field accesses to guarantee that the values of fields
-are retrieved from the data store prior to application usage.
-<OL TYPE="A">
-<LI>For any field access that reads the value of a field, the getfield byte code
-is replaced with a call to a generated local method, <code>jdoGetXXX</code></LI>
-<LI>For any field access that stores the new value of a field, the putfield
-byte code is replaced with a call to a generated local method,
-<code>jdoSetXXX</code></LI>
-</OL>
-
- */
-
-public class FieldAccessModified extends EnhancerTest {
-
-    /** */
-    private static final String ASSERTION_FAILED = 
-        "Assertion (FieldAccessModified) failed: ";
-    
-    /**
-     * The <code>main</code> is called when the class
-     * is directly executed from the command line.
-     * @param args The arguments passed to the program.
-     */
-    public static void main(String[] args) {
-        BatchTestRunner.run(FieldAccessModified.class);
-    }
-
-    
-    /** */
-    public void test() {
-        if (debug)
-            logger.debug("org.apache.jdo.tck.enhancement.FieldAccessModified.run");
-        PMFPropertiesObject = loadProperties(PMFProperties); // will exit here if no properties
-        runTestAllPackages();
-        cleanup();
-    }
-
-    /** */
-    protected void runTestOnePackage (String packageName, List classNames) {
-        if (debug)
-            logger.debug("FieldAccessModified.testOnePackage: " + 
-                         packageName + " classes " + classNames);
-        
-        PrintWriter out = new PrintWriter(System.out);
-        final AnnotationTest test = new AnnotationTest(out, out);
-        final String classpath = System.getProperty("java.class.path");
-        final String jdoPropertiesFileName = 
-            packageName.replace ('.', '/') + "/jdoTest.properties"; //NOI18N        
-        final String[] args = new String[classNames.size() + 6];
-        int index = 0;
-        // init arguments for AnnotationTest.run call
-        // specify properties file
-        args[index++] = "--properties";
-        args[index++] = jdoPropertiesFileName;
-        // specify jdo path to find the properties file
-        args[index++] = "-j";
-        args[index++] = classpath;
-        // specify source path to find the classes
-        args[index++] = "-s";
-        args[index++] = classpath;
-        // add class names
-        for (java.util.Iterator i = classNames.iterator(); i.hasNext();) {
-            args[index++] = (String)i.next();
-        }
-        if (debug)
-            logger.debug ("Run AnnotationTest with args " + Arrays.asList(args));
-        int errors = test.run(args);
-        if (errors > 0) {
-            fail(ASSERTION_FAILED,
-                 "AnnotationTest with args " + Arrays.asList(args) +
-                 " results in " + errors + " errors.");
-        }
-    }
-}

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/ImplementsPersistenceCapable.java.fix
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/ImplementsPersistenceCapable.java.fix?rev=179227&r1=179226&r2=179227&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/ImplementsPersistenceCapable.java.fix
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/enhancement/ImplementsPersistenceCapable.java.fix
Tue May 31 09:00:20 2005
@@ -1,100 +0,0 @@
-/*
- * Copyright 2005 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at 
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License.
- */
-
-package org.apache.jdo.tck.enhancement;
-
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.jdo.impl.enhancer.util.AugmentationTest;
-import org.apache.jdo.tck.util.BatchTestRunner;
-
-/**
- *<B>Title:</B> Implements PersistenceCapable Added
- *<BR>
- *<B>Keywords:</B> enhancement
- *<BR>
- *<B>Assertion ID:</B> A20.3-0.
- *<BR>
- *<B>Assertion Description: </B>
-The Reference Enhancer makes the following change
-to persistence-capable classes:
-it adds <code>&quot;implements javax.jdo.PersistenceCapable</code>&quot;
-to the class definition.
-
- */
-
-public class ImplementsPersistenceCapable extends EnhancerTest {
-
-    /** */
-    private static final String ASSERTION_FAILED = 
-        "Assertion A20.3-0 (ImplementsPersistenceCapable) failed: ";
-    
-    /**
-     * The <code>main</code> is called when the class
-     * is directly executed from the command line.
-     * @param args The arguments passed to the program.
-     */
-    public static void main(String[] args) {
-        BatchTestRunner.run(ImplementsPersistenceCapable.class);
-    }
-
-    /** */
-    public void test() {
-        if (debug)
-            logger.debug("org.apache.jdo.tck.enhancement.ImplementsPersistenceCapable.run");
-        runTestAllPackages();
-        cleanup();
-    }
-
-    /** */
-    protected void runTestOnePackage (String packageName, List classNames) {
-        if (debug) 
-            logger.debug("ImplementsPersistenceCapable.testOnePackage: " + 
-                         packageName + " classes " + classNames);
-        
-        PrintWriter out = new PrintWriter(System.out);
-        final AugmentationTest test = new AugmentationTest(out, out);
-        final String classpath = System.getProperty("java.class.path");
-        final String jdoPropertiesFileName = 
-            packageName.replace ('.', '/') + "/jdoTest.properties"; //NOI18N        
-        final String[] args = new String[classNames.size() + 6];
-        int index = 0;
-        // init arguments for AugmentationTest.run call
-        // specify properties file
-        args[index++] = "--properties";
-        args[index++] = jdoPropertiesFileName;
-        // specify jdo path to find the properties file
-        args[index++] = "-j";
-        args[index++] = classpath;
-        // specify source path to find the classes
-        args[index++] = "-s";
-        args[index++] = classpath;
-        // add class names
-        for (java.util.Iterator i = classNames.iterator(); i.hasNext();) {
-            args[index++] = (String)i.next();
-        }
-        if (debug)
-            logger.debug ("Run AugmentationTest with args " + Arrays.asList(args));
-        int errors = test.run(args);
-        if (errors > 0) {
-            fail(ASSERTION_FAILED,
-                 "AugmentationTest with args " + Arrays.asList(args) +
-                 " results in " + errors + " errors.");
-        }
-    }
-}



Mime
View raw message