You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sm...@apache.org on 2006/04/13 07:43:52 UTC

svn commit: r393717 - in /incubator/harmony/enhanced/classlib/trunk: make/ modules/regex-beans-math/ modules/regex-beans-math/doc/ modules/regex-beans-math/src/common/javasrc/java/util/regex/ modules/regex-beans-math/test/common/unit/java/util/regex/ m...

Author: smishura
Date: Wed Apr 12 22:43:49 2006
New Revision: 393717

URL: http://svn.apache.org/viewcvs?rev=393717&view=rev
Log:
HARMONY-221 (regex need moving from modules/regex-beans-math to modules/regex)

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/regex/COPYRIGHT
      - copied unchanged from r393689, incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/COPYRIGHT
    incubator/harmony/enhanced/classlib/trunk/modules/regex/LICENSE
      - copied unchanged from r393689, incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/LICENSE
    incubator/harmony/enhanced/classlib/trunk/modules/regex/NOTICE
      - copied unchanged from r393689, incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/NOTICE
    incubator/harmony/enhanced/classlib/trunk/modules/regex/README.TXT
      - copied unchanged from r393689, incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/README.TXT
    incubator/harmony/enhanced/classlib/trunk/modules/regex/doc/
      - copied from r393689, incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/doc/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/make/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/make/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/hyproperties.xml
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/main/java/java/util/regex/
      - copied from r393689, incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/util/regex/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/
      - copied from r393689, incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/test/common/unit/java/util/regex/
Removed:
    incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/COPYRIGHT
    incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/LICENSE
    incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/NOTICE
    incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/README.TXT
    incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/doc/
    incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/src/common/javasrc/java/util/regex/
    incubator/harmony/enhanced/classlib/trunk/modules/regex-beans-math/test/common/unit/java/util/regex/
Modified:
    incubator/harmony/enhanced/classlib/trunk/make/build-test.xml
    incubator/harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/make/build-test.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/build-test.xml?rev=393717&r1=393716&r2=393717&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-test.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-test.xml Wed Apr 12 22:43:49 2006
@@ -33,7 +33,7 @@
 
 	<!-- this list of components to test will grow to eventually be all modules -->
 	<target name="test-all"
-		depends="clean, test-security, test-luni, test-archive, test-text, test-nio, test-xnet, test-nio_char, test-logging, test-jndi, test-sql, test-prefs, test-beans, test-math, test-crypto, test-auth, gen-report, check-test-result">
+		depends="clean, test-security, test-luni, test-archive, test-text, test-nio, test-xnet, test-nio_char, test-logging, test-jndi, test-sql, test-prefs, test-beans, test-math, test-crypto, test-auth, test-regex, gen-report, check-test-result">
 	</target>
 
 	<target name="clean">
@@ -151,6 +151,13 @@
             <echo message="Running tests for module math"/>
             <echo message="=================================="/>
             <ant antfile="make/build.xml" dir="modules/math" target="test" />
+	</target>
+
+	<target name="test-regex">
+            <echo message="=================================="/>
+            <echo message="Running tests for module regex"/>
+            <echo message="=================================="/>
+            <ant antfile="make/build.xml" dir="modules/regex" target="test" />
 	</target>
 
 	<target name="test-security" depends="compile-support">

Modified: incubator/harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF?rev=393717&r1=393716&r2=393717&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex/META-INF/MANIFEST.MF Wed Apr 12 22:43:49 2006
@@ -5,6 +5,8 @@
 Bundle-Version: 1.0.0
 Bundle-ClassPath: .
 Eclipse-JREBundle: true
-Import-Package: java.lang,
+Import-Package: java.io,
+ java.lang,
+ java.text,
  java.util
 Export-Package: java.util.regex

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex/make/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex/make/build.xml?rev=393717&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex/make/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex/make/build.xml Wed Apr 12 22:43:49 2006
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    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.
+-->
+
+<project name="REGEX Build" default="build" basedir="..">
+	<description>Build for REGEX component</description>
+
+	<!-- set global properties for this build. -->
+	<xmlproperty file="make/common/hyproperties.xml" semanticAttributes="true"/>
+	<property environment="env"/>
+
+	<!-- Determine the (normalized) operating system family -->
+	<condition property="if.win">
+		<os family="Windows" />
+	</condition>
+	<condition property="hy.os_family" value="windows">
+		<isset property="if.win"/>
+	</condition>
+
+	<condition property="if.linux">
+		<and>
+			<os name="linux" />
+			<os family="unix" />
+		</and>
+	</condition>
+	<condition property="hy.os_family" value="linux">
+		<isset property="if.linux"/>
+	</condition>
+
+
+	<!-- Determine the (normalized) processor family -->
+	<condition property="if.x86_64">
+		<contains string="${os.arch}" substring="x86_64"/>
+	</condition>
+	<condition property="hy.cpu_family" value="x86_64">
+		<isset property="if.x86_64"/>
+	</condition>
+	
+	<condition property="if.x86">
+		<and>
+			<contains string="${os.arch}" substring="86"/>
+			<not>
+				<isset property="if.x86_64"/>
+			</not>
+		</and>
+	</condition>
+	<condition property="hy.cpu_family" value="x86">
+		<isset property="if.x86"/>
+	</condition>
+	
+	<condition property="if.ipf">
+		<contains string="${os.arch}" substring="ia64"/>
+	</condition>
+	<condition property="hy.cpu_family" value="ipf">
+		<isset property="if.ipf"/>
+	</condition>
+
+	<!-- Define the platform property dependant upon the OS and platform -->
+	<property name="hy.platform" value="${hy.os_family}.${hy.cpu_family}"/>
+
+	<!-- Set build.compiler to "org.eclipse.jdt.core.JDTCompilerAdapter" to
+	     use the Eclipse Java compiler. But it does not support jsr14 target -->
+	<property name="build.compiler" value="modern" />
+
+	<target name="init">
+		<tstamp>
+			<format property="build-date" pattern="yyyyMMdd" locale="en" />
+		</tstamp>
+		<tstamp>
+			<format property="build-time" pattern="yyyyMMdd_HHmm" />
+		</tstamp>
+		<echo message="build-date=${build-date}" />
+		<echo message="build-time=${build-time}" />
+		<echo message="on platform=${os.name} version=${os.version} arch=${os.arch}" />
+
+		<property name="java.debug.option" value="on" />
+		<property name="native.debug.option" value="on" />
+
+		<property name="source.ver" value="1.5" />
+	</target>
+	
+	<!-- REGEX TARGETS -->
+
+	<target name="build" depends="init">
+		<ant dir="make/common" target="compile.java" />
+		<ant dir="make/common" target="build.jar" />
+	<!--	<ant dir="make/platform/${hy.platform}" target="compile.native" /> -->
+		<ant dir="make/common" target="copy.resources" />
+	</target>
+
+
+	<target name="test" depends="build">
+		<ant dir="make/common" target="compile.tests" />
+		<ant dir="make/common" target="run.tests" />
+	</target>
+
+	<target name="clean">
+		<delete dir="${hy.regex.bin.main}"/>
+		<delete dir="${hy.regex.bin.test}"/>
+	</target>
+
+</project>

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/build.xml?rev=393717&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/build.xml Wed Apr 12 22:43:49 2006
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    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.
+-->
+
+<project name="Common_REGEX_Build">
+	
+	<target name="compile.java" description="Compile REGEX java code">
+		<echo message="Compiling REGEX classes from ${hy.regex.src.main.java}" />
+		
+		<mkdir dir="${hy.regex.bin.main}" />
+
+		<javac sourcepath=""
+			srcdir="${hy.regex.src.main.java}"
+			destdir="${hy.regex.bin.main}"
+			source="${source.ver}"
+			target="jsr14"
+			debug="${java.debug.option}">
+
+			<bootclasspath>
+				<fileset dir="${hy.target}/jre/lib/boot">
+					<include name="**/*.jar" />
+				</fileset>
+			</bootclasspath>
+		</javac>
+	</target>
+	
+	<target name="build.jar">
+		<jar destfile="${hy.target}/jre/lib/boot/regex.jar"
+			manifest="${hy.regex}/META-INF/MANIFEST.MF">
+			<fileset dir="${hy.regex.bin.main}" />
+		</jar>
+	</target>
+
+	
+	<target name="compile.tests">
+		<echo message="Compiling REGEX tests from ${hy.regex.src.test.java}" />
+
+		<mkdir dir="${hy.regex.bin.test}" />
+
+		<javac srcdir="${hy.regex.src.test.java}"
+			destdir="${hy.regex.bin.test}"
+			sourcepath=""
+			source="${source.ver}"
+			target="jsr14"
+			debug="${java.debug.option}">
+
+			<bootclasspath>
+				<fileset dir="${hy.target}/jre/lib/boot">
+					<include name="**/*.jar" />
+				</fileset>
+			</bootclasspath>
+                        <classpath location="../../../../build/tests" />
+		</javac>
+	</target>
+
+
+	<target name="run.tests">
+		
+	        <mkdir dir="${hy.tests.reports}" />
+
+	        <junit fork="yes"
+			forkmode="once"
+			printsummary="withOutAndErr"
+			errorproperty="test.errors"
+			failureproperty="test.failures"
+			showoutput="on"
+			dir="${hy.regex.bin.test}"
+			jvm="${hy.target}/jre/bin/java">
+
+			<jvmarg value="-showversion"/>
+
+			<env key="JAVA_HOME" value="${hy.target}/jre"/>
+
+			<classpath>
+				<pathelement path="${hy.regex.bin.test}"/>
+			</classpath>
+                        <classpath location="../../../../build/tests" />
+
+			<formatter type="xml" />
+
+			<batchtest todir="${hy.tests.reports}" haltonfailure="no">
+				<fileset dir="${hy.regex.src.test.java}">
+					<include name="**/*Test.java"/>
+
+				</fileset>
+			</batchtest>
+		</junit>
+		<antcall target="touch-failures-file" />
+		<antcall target="touch-errors-file" />
+	</target>
+	
+	<target name="touch-failures-file" if="test.failures">
+		<echo file="${hy.tests.reports}/test.failures"
+			append="true" >regex
+</echo>
+	</target>
+	<target name="touch-errors-file" if="test.errors">
+		<echo file="${hy.tests.reports}/test.errors"
+			append="true" >regex
+</echo>
+	</target>
+	
+	<target name="copy.resources">
+		<!-- Nothing for REGEX -->
+	</target>
+</project>
+

Added: incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/hyproperties.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/hyproperties.xml?rev=393717&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/hyproperties.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex/make/common/hyproperties.xml Wed Apr 12 22:43:49 2006
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    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.
+-->
+
+<hy>
+   <regex location=".">
+      <src>
+         <main>
+            <java location="src/main/java" />
+        	<resources location="src/main/resources" />
+         </main>
+         <test>
+            <java location="src/test/java" />
+            <resources location="src/main/resources" />
+         </test>
+         <natives location="src/natives" />
+      </src>
+      <bin>
+        <main location="bin/main" />
+        <test location="bin/test" />
+      </bin>
+      <packaging>
+      </packaging>
+   </regex>
+
+   <target location="../../deploy" />
+
+   <tests>
+      <reports location="../../build/test_report" />
+   </tests>
+</hy>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java?rev=393717&r1=393689&r2=393717&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/MatcherTest.java Wed Apr 12 22:43:49 2006
@@ -18,9 +18,11 @@
  * @author Nikolay A. Kuznetsov
  * @version $Revision: 1.10.2.2 $
  */
-package java.util.regex;
+package org.apache.harmony.tests.java.util.regex;
 
 import junit.framework.TestCase;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * @author Nikolay A. Kuznetsov

Modified: incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java?rev=393717&r1=393689&r2=393717&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/regex/src/test/java/org/apache/harmony/tests/java/util/regex/PatternTest.java Wed Apr 12 22:43:49 2006
@@ -18,9 +18,12 @@
  * @author Nikolay A. Kuznetsov
  * @version $Revision: 1.12.2.2 $
  */
-package java.util.regex;
+package org.apache.harmony.tests.java.util.regex;
 
 import junit.framework.TestCase;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
 
 /**
  * @author Nikolay A. Kuznetsov