Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 27768 invoked from network); 23 Nov 2006 01:54:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Nov 2006 01:54:49 -0000 Received: (qmail 11492 invoked by uid 500); 23 Nov 2006 01:54:55 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 11433 invoked by uid 500); 23 Nov 2006 01:54:55 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 11423 invoked by uid 99); 23 Nov 2006 01:54:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Nov 2006 17:54:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of alexei.fedotov@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Nov 2006 17:54:42 -0800 Received: by nf-out-0910.google.com with SMTP id a4so741558nfc for ; Wed, 22 Nov 2006 17:54:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=RgCyB5gBZEPwJ1TbjEYHcTGl6WLBmZ43UgrIU/sP6m/Ghfq8BMg9BYbcQmbdrBoYGqsuc3/i3D1wBZQEdQsof2mut3a+phgtIk3j4/d9F6TYY6j44fwQqY2+s/i9/ztsNG3oa7BIaztPuVLbYqIOyi5EXeFlMIk+mFnKOK5fvTo= Received: by 10.78.17.1 with SMTP id 1mr8485028huq.1164246860131; Wed, 22 Nov 2006 17:54:20 -0800 (PST) Received: by 10.78.133.6 with HTTP; Wed, 22 Nov 2006 17:54:19 -0800 (PST) Message-ID: Date: Thu, 23 Nov 2006 04:54:19 +0300 From: "Alexei Fedotov" To: dev@harmony.apache.org 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/ MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org 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 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 @@ > > > > + > > > > > 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 @@ > > > > + > > > > @@ -159,6 +160,7 @@ > > > > + > > > > > 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 pattern 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 > > >