harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov" <alexei.fedo...@gmail.com>
Subject PatternTest.golden.ser cannot be found Was: svn commit: r477745 - in /harmony/enhanced/classlib/trunk/modules/regex: ./ META-INF/ src/main/java/java/util/regex/ src/test/java/org/apache/harmony/tests/java/util/regex/ src/test/resources/serialization/
Date Thu, 23 Nov 2006 01:54:19 GMT
Paulex,

Vladimir reports the test
org.apache.harmony.tests.java.util.regex.PatternTest@testSerialization
cannot find PatternTest.golden.ser. Why this could be?

Should the file be copied to bin/test? Or should we add it's current
locaton to the classpath?
-- 
Thank you,
Alexei


On 11/21/06, pyang@apache.org <pyang@apache.org> wrote:
> Author: pyang
> Date: Tue Nov 21 08:56:52 2006
> New Revision: 477745
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=477745
> Log:
> A couple of updates:
> 1. Apply patch for HARMONY-2225 ([classlib] [regex] False positives and other errors
in Pattern.matches(..))
> 2. Apply patch for HARMONY-2245 ([classlib] [regex] Serialization and de-serialization
fails for java.util.regex.Pattern)
> 3. create a golden file for Pattern serialization test
> 4. Tweak the MANIFEST.MF, build.xml, .classpath to build and use test resources
>
> Added:
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/tests/
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/tests/java/
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/tests/java/util/
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/tests/java/util/regex/
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/tests/java/util/regex/PatternTest.golden.ser
  (with props)
> Modified:
>    harmony/enhanced/classlib/trunk/modules/regex/.classpath
>    harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF
>    harmony/enhanced/classlib/trunk/modules/regex/build.xml
>    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java
>    harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/ReluctantCompositeQuantifierSet.java
>    harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java
>
> Modified: harmony/enhanced/classlib/trunk/modules/regex/.classpath
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/.classpath?view=diff&rev=477745&r1=477744&r2=477745
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/regex/.classpath (original)
> +++ harmony/enhanced/classlib/trunk/modules/regex/.classpath Tue Nov 21 08:56:52 2006
> @@ -3,6 +3,7 @@
>        <classpathentry output="bin/main" kind="src" path="src/main/java"/>
>        <classpathentry output="bin/main" kind="src" path="src/main/resources"/>
>        <classpathentry output="bin/test" kind="src" path="src/test/java"/>
> +       <classpathentry output="bin/test" kind="src" path="src/test/resources"/>
>        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
>        <classpathentry sourcepath="JUNIT_SRC_HOME/junitsrc.zip" kind="var" path="JUNIT_HOME/junit.jar"/>
>        <classpathentry kind="output" path="bin/main"/>
>
> Modified: harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF?view=diff&rev=477745&r1=477744&r2=477745
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF (original)
> +++ harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF Tue Nov 21 08:56:52
2006
> @@ -13,8 +13,9 @@
>  Eclipse-JREBundle: true
>  Import-Package: java.io,
>  java.lang,
> - java.text,
> - java.util,
>  java.security,
> - org.apache.harmony.kernel.vm
> + java.util,
> + java.text,
> + org.apache.harmony.kernel.vm,
> + org.apache.harmony.testframework.serialization;hy_usage=test;resolution:=optional
>  Export-Package: java.util.regex
>
> Modified: harmony/enhanced/classlib/trunk/modules/regex/build.xml
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/build.xml?view=diff&rev=477745&r1=477744&r2=477745
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/regex/build.xml (original)
> +++ harmony/enhanced/classlib/trunk/modules/regex/build.xml Tue Nov 21 08:56:52 2006
> @@ -136,6 +136,7 @@
>                     <include name="**/*.jar" />
>                 </fileset>
>             </bootclasspath>
> +            <classpath location="${hy.hdk}/build/test/support.jar" />
>             <classpath location="../../build/tests" />
>         </javac>
>     </target>
> @@ -159,6 +160,7 @@
>             <classpath>
>                 <pathelement path="${hy.regex.bin.test}"/>
>             </classpath>
> +            <classpath location="${hy.hdk}/build/test/support.jar" />
>             <classpath location="../../build/tests" />
>
>             <formatter type="xml" />
>
> Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java?view=diff&rev=477745&r1=477744&r2=477745
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/Pattern.java
Tue Nov 21 08:56:52 2006
> @@ -87,7 +87,7 @@
>     /**
>      * Current <code>pattern</code> to be compiled;
>      */
> -    private Lexer lexemes = null;
> +    private transient Lexer lexemes = null;
>
>     /**
>      * Pattern compile flags;
> @@ -278,6 +278,7 @@
>             throws PatternSyntaxException {
>         this.lexemes = new Lexer(regex, flags);
>         this.flags = flags;
> +        this.pattern = regex;
>
>         start = processExpression(-1, this.flags, null);
>         if (!lexemes.isEmpty()) {
> @@ -610,6 +611,7 @@
>                     // ////
>                     && !(cur instanceof CompositeQuantifierSet)
>                     && !(cur instanceof GroupQuantifierSet)
> +                    && !(cur instanceof AltQuantifierSet)
>                     && !next.first(((LeafQuantifierSet) cur).getInnerSet()))
{
>                 cur = new UnifiedQuantifierSet((LeafQuantifierSet) cur);
>             }
> @@ -1244,6 +1246,7 @@
>         globalGroupIndex = -1;
>         compCount = -1;
>         consCount = -1;
> +        backRefs = new FSet [BACK_REF_NUMBER];
>
>         compileImpl(pattern, flags);
>
>
> Modified: harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/ReluctantCompositeQuantifierSet.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/ReluctantCompositeQuantifierSet.java?view=diff&rev=477745&r1=477744&r2=477745
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/ReluctantCompositeQuantifierSet.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/ReluctantCompositeQuantifierSet.java
Tue Nov 21 08:56:52 2006
> @@ -66,7 +66,7 @@
>                 i++;
>             }
>
> -        } while (shift >= 1 && i < max);
> +        } while (shift >= 1 && i <= max);
>
>         return -1;
>     }
>
> Modified: harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java?view=diff&rev=477745&r1=477744&r2=477745
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java
(original)
> +++ harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java
Tue Nov 21 08:56:52 2006
> @@ -17,11 +17,16 @@
>
>  package org.apache.harmony.tests.java.util.regex;
>
> -import junit.framework.TestCase;
> +import java.io.Serializable;
>  import java.util.regex.Matcher;
>  import java.util.regex.Pattern;
>  import java.util.regex.PatternSyntaxException;
>
> +import junit.framework.TestCase;
> +
> +import org.apache.harmony.testframework.serialization.SerializationTest;
> +import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
> +
>  public class PatternTest extends TestCase {
>        String[] testPatterns = {
>                        "(a|b)*abb",
> @@ -697,6 +702,17 @@
>                mat.matches();
>                assertEquals(15, mat.end());
>        }
> +
> +    public void testSerialization() throws Exception {
> +        Pattern pat = Pattern.compile("a*bc");
> +        SerializableAssert comparator = new SerializableAssert(){
> +                    public void assertDeserialized(Serializable initial, Serializable
deserialized) {
> +                        assertEquals(((Pattern)initial).toString(), ((Pattern)deserialized).toString());
> +                    }
> +                };
> +        SerializationTest.verifyGolden(this, pat, comparator);
> +        SerializationTest.verifySelf(pat, comparator);
> +    }
>
>        public void testSOLQuant() {
>                Pattern pat = Pattern.compile("$*", Pattern.MULTILINE);
>
> Added: harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/tests/java/util/regex/PatternTest.golden.ser
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/tests/java/util/regex/PatternTest.golden.ser?view=auto&rev=477745
> ==============================================================================
> Binary file - no diff available.
>
> Propchange: harmony/enhanced/classlib/trunk/modules/regex/src/test/resources/serialization/org/apache/harmony/tests/java/util/regex/PatternTest.golden.ser
> ------------------------------------------------------------------------------
>    svn:mime-type = application/octet-stream
>
>
>

Mime
View raw message