harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r658196 [1/2] - in /harmony/enhanced/drlvm/trunk: ./ make/ make/tests/ vm/tests/lazy/ vm/tests/lazy/broken/ vm/tests/lazy/broken/org/ vm/tests/lazy/broken/org/apache/ vm/tests/lazy/broken/org/apache/harmony/ vm/tests/lazy/broken/org/apache/...
Date Tue, 20 May 2008 10:49:10 GMT
Author: varlax
Date: Tue May 20 03:49:08 2008
New Revision: 658196

URL: http://svn.apache.org/viewvc?rev=658196&view=rev
Log:
Fixed HARMONY-3940 [drlvm][test] Integrate lazy-resolution compatibility suite

Added:
    harmony/enhanced/drlvm/trunk/make/tests/lazy-test.xml   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface2.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface3.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject1.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject2.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject3.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/AllocationTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CallsTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CastsTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/ClinitTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/FieldsTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InstanceOfTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InterfaceCallsTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/OptimizerTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/SignatureTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/AllocationTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CallsTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CastsTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/ClinitTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/FieldsTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/InstanceOfTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/InterfaceCallsTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyException1.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyException2.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface2.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface3.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface4.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyObject1.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyObject2.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyObject3.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyObject4.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyObject5.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/OptimizerTest.java   (with props)
    harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/SignatureTest.java   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/build.xml
    harmony/enhanced/drlvm/trunk/make/test.properties

Modified: harmony/enhanced/drlvm/trunk/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build.xml?rev=658196&r1=658195&r2=658196&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build.xml (original)
+++ harmony/enhanced/drlvm/trunk/build.xml Tue May 20 03:49:08 2008
@@ -353,4 +353,9 @@
         <available property="test.failed" file="${base.test.dir}/reg.test.failed" />
     </target>
 
+    <target name="lazy.test">
+        <ant antfile="make/tests/lazy-test.xml" target="lazy-test"/>
+        <available property="test.failed" file="${base.test.dir}/lazy.test.failed" />
+    </target>
+
 </project>

Modified: harmony/enhanced/drlvm/trunk/make/test.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/make/test.properties?rev=658196&r1=658195&r2=658196&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/make/test.properties (original)
+++ harmony/enhanced/drlvm/trunk/make/test.properties Tue May 20 03:49:08 2008
@@ -42,11 +42,12 @@
 #
 #  kernel.test.forkmode
 #
-#  instantiate one VM for kernel testsuite
-#  or one per test
+#  instantiate one VM per testsuite
+#  or one per single testcase
 #  valid values are "once" and "perTest"
 #
 kernel.test.forkmode=once
+lazy.test.forkmode=once
 
 # --------------------------------------------
 #

Added: harmony/enhanced/drlvm/trunk/make/tests/lazy-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/make/tests/lazy-test.xml?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/make/tests/lazy-test.xml (added)
+++ harmony/enhanced/drlvm/trunk/make/tests/lazy-test.xml Tue May 20 03:49:08 2008
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+     Licensed to the Apache Software Foundation (ASF) under one or more
+     contributor license agreements.  See the NOTICE file distributed with
+     this work for additional information regarding copyright ownership.
+     The ASF licenses this file to You 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="Lazy resolution tests" default="lazy-test">
+
+    <import file="test-common.xml"/>
+    
+    <property name="lazy.test.javasrc" location="${test.home}/lazy" />
+    <property name="lazy.test.dir" location="${base.test.dir}/lazy.tests"/>
+    <property name="lazy.test.summary" location="${lazy.test.dir}/status.txt"/>
+    <property name="test.class.path" location="${lazy.test.dir}/classes"/>
+    
+    <target name="lazy-test" 
+        depends="-init-test,
+        compile-lazy-test, run-lazy-test, report-lazy-test, check-lazy-test"/>
+    
+    <target name="run-lazy-test">
+        <prepare-test-run test-dir="${lazy.test.dir}"/>
+        <delete file="${lazy.test.summary}" quiet="true"/>
+        <delete file="${base.test.dir}/lazy.test.failed" quiet="true"/>
+        
+        <echo>
+        ==================================
+        Tested JVM: ${test.jvm.exe}
+        ==================================
+        </echo>
+        
+        <for list="${test.mode}" param="mode" trim="true">
+            <sequential>
+                <antcall target="-run-lazy-test-batch"> 
+                    <param name="run.mode" value="@{mode}" />
+                </antcall>
+            </sequential>
+        </for>
+    </target>
+    
+    <target name="report-lazy-test">
+        <for list="${test.mode}" param="mode"
+            trim="true" keepgoing="true">
+            <sequential>
+                <gen-test-report dir="${lazy.test.dir}/reports/@{mode}.mode"/>
+            </sequential>
+        </for>
+    </target>
+
+    <target name="check-lazy-test">
+        <loadfile property="lazy.test.summary.txt" 
+            srcFile="${lazy.test.summary}"/>
+        <echo message="  ***************************${line.separator}"/>
+        <echo message="  *** Kernel tests status ***${line.separator}"/>
+        <echo message="  ***************************${line.separator}"/>
+        <echo message="${line.separator}"/>
+        <echo message="${lazy.test.summary.txt}"/>
+        <echo message="${line.separator}"/>
+        <echo>Please find detailed results under ${lazy.test.dir}${file.separator}reports directory.</echo>
+        
+        <condition property="test.failed">
+            <contains string="${lazy.test.summary.txt}" substring="FAILED" />
+        </condition>
+        <antcall target="touch-failures-file"/>
+        <fail unless="run.all.tests" if="test.failed" message="There were test failures."/>
+    </target>
+    
+    <target name="touch-failures-file" if="test.failed">
+        <copy file="${lazy.test.summary}" tofile="${base.test.dir}/lazy.test.failed">
+            <filterchain>
+                <linecontains>
+                    <contains value="FAILED"/>
+                </linecontains>
+                <trim/>
+            </filterchain>
+        </copy>
+    </target>
+
+    <target name="compile-lazy-test">
+
+        <compile-java src="${lazy.test.javasrc}/broken" 
+            dest="${test.class.path}/broken"/>
+        <compile-java src="${lazy.test.javasrc}" 
+            dest="${test.class.path}">
+            <exclude name="broken/**/*.java"/>
+        </compile-java>
+    </target>
+    
+    <target name="-run-lazy-test-batch">
+        <propertycopy property="run.mode.name" from="${run.mode}.name" override="on"/>       
+        <propertycopy property="run.mode.switch" from="${run.mode}.switch" override="on"/>        
+        <property name="report.dir"
+            location="${lazy.test.dir}/reports/${run.mode}.mode"/>
+        <mkdir dir="${report.dir}" />
+
+        <echo>
+        ==================================
+        Run lazy resolution tests using ${run.mode.name} 
+        ==================================
+        </echo>
+        
+        <take-xlist name="exclude.file" file="${excludes.dir}/exclude.drlvm_lazy.${hy.platform}.${run.mode}"/>
+
+        <junit fork="yes" failureproperty="lazy.failed"
+            filtertrace="no" printsummary="on" showoutput="off"
+            haltonfailure="${test.failfast}"
+            forkmode="${lazy.test.forkmode}" 
+            timeout="${test.timeout}"
+            dir="${lazy.test.dir}"
+            jvm="${test.jvm.exe}">
+
+            <classpath path="${test.class.path}"/>
+            <jvmarg line="${run.mode.switch} ${test.vmargs}" />
+            <formatter type="xml"/>
+            <batchtest todir="${report.dir}" unless="test.case">
+                <fileset dir="${lazy.test.javasrc}"> 
+                    <include name="org/apache/harmony/vm/test/lazyresolution/*Test.java" />
+                    <excludesfile name="${exclude.file}" if="exclude.file" />
+                </fileset>
+            </batchtest>
+            <test name="${test.case}" todir="${report.dir}" if="test.case" />
+        </junit>
+        
+        <condition property="lazy.status" value="FAILED" else="PASSED">
+            <isset property="lazy.failed" />
+        </condition>
+
+        <concat append="on" destfile="${lazy.test.summary}" 
+            >      ${run.mode.name} ${lazy.status}${line.separator}</concat>
+    </target>
+</project>

Propchange: harmony/enhanced/drlvm/trunk/make/tests/lazy-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface2.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface2.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface2.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface2.java Tue May 20 03:49:08 2008
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+public interface LazyInterface2 {
+
+    public static int intStaticField=Integer.parseInt("12"); 
+
+    void interfaceCall2();
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface3.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface3.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface3.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface3.java Tue May 20 03:49:08 2008
@@ -0,0 +1,26 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+public interface LazyInterface3 {
+
+    static String stringStaticField = new Integer(13).toString();
+
+    void interfaceCall2();
+
+    void interfaceCall3();
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject1.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject1.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject1.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject1.java Tue May 20 03:49:08 2008
@@ -0,0 +1,35 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+
+public class LazyObject1 {
+    private static int intStaticField=10; 
+
+    private int intField=20; 
+
+
+    private static int getIntStaticField() {return intStaticField;}
+    private int getIntField() {return intField;}
+
+    private LazyObject1(){}
+    public LazyObject1(int v){intField=v;}
+
+
+    public static String staticMapField = null;
+    public String mapField = null;
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject2.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject2.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject2.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject2.java Tue May 20 03:49:08 2008
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+
+public abstract class LazyObject2 implements LazyInterface2 {
+
+    public static int intStaticField=10; 
+
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject3.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject3.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject3.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject3.java Tue May 20 03:49:08 2008
@@ -0,0 +1,36 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+
+public class LazyObject3 implements LazyInterface3 {
+
+    public static int intStaticField=10; 
+
+    public void interfaceCall2() {
+        intStaticField+=10;
+    }
+
+    public void interfaceCall2a() {
+        intStaticField+=10;
+    }
+
+    public void interfaceCall3() {
+        intStaticField+=100;
+    }
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyObject3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/AllocationTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/AllocationTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/AllocationTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/AllocationTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,120 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class AllocationTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+
+//ALLOCATION
+    public void testNewObj1() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObj1");
+    }
+
+    public void testNewObj2() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObj2");
+    }
+
+    public void testNewObj3() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObj3");
+    }
+
+    public void testNewObj4() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObj4");
+    }
+
+    public void testNewObj5() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObj5");
+    }
+
+    public void testNewObjInLoop() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObjInLoop");
+    }
+
+    public void testNewObjBroken1() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObjBroken1");
+    }
+
+    public void testNewObjBroken2() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObjBroken2");
+    }
+
+    public void testNewObjBroken3() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewObjBroken3");
+    }
+
+    public void testNewArray1() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewArray1");
+    }
+
+    public void testNewArray2() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewArray2");
+    }
+
+    public void testNewArray3() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewArray3");
+    }
+
+    public void testNewArray4() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewArray4");
+    }
+
+    public void testNewArray5() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewArray5");
+    }
+
+    public void testNewArray6() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewArray6");
+    }
+
+    public void testNewMultiArray1() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewMultiArray1");
+    }
+
+
+    public void testNewMultiArray2() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewMultiArray2");
+    }
+
+    public void testNewMultiArray3() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewMultiArray3");
+    }
+
+    public void testNewMultiArray4() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewMultiArray4");
+    }
+
+    public void testNewMultiArray5() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewMultiArray5");
+    }
+
+    public void testNewMultiArray6() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewMultiArray6");
+    }
+
+    public void testNewMultiArray7() throws Throwable {
+        getClassLoader().runTest(this, "AllocationTest.testNewMultiArray7");
+    }
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/AllocationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CallsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CallsTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CallsTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CallsTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class CallsTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+//CALLS
+
+    public void testInvokeStatic1() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeStatic1");
+    }
+
+    public void testInvokeStaticWithNotFoundError() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeStaticWithNotFoundError");
+    }
+
+    public void testInvokeStaticBroken1() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeStaticBroken1");
+    }
+
+    public void testInvokeStaticBroken2() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeStaticBroken2");
+    }
+
+    public void testInvokeVirtual1() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeVirtual1");
+    }
+
+    public void testInvokeVirtual2() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeVirtual2");
+    }
+
+    public void testInvokeVirtual3() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeVirtual3");
+    }
+
+    public void testInvokeVirtualBroken1() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeVirtualBroken1");
+    }
+
+    public void testInvokeVirtualBroken2() throws Throwable {
+        getClassLoader().runTest(this, "CallsTest.testInvokeVirtualBroken2");
+    }
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CallsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CastsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CastsTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CastsTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CastsTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class CastsTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+// CASTS
+
+    public void testCast1() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCast1");
+    }
+
+    public void testCast2() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCast2");
+    }
+
+    public void testCast3() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCast3");
+    }
+
+    public void testCast4() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCast4");
+    }
+
+    public void testCast5() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCast5");
+    }
+
+    public void testCast6() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCast6");
+    }
+
+    public void testCast7() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCast7");
+    }
+
+    public void testCast8() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCast8");
+    }
+
+    public void testCastWithNotFoundError() throws Throwable {
+        getClassLoader().runTest(this, "CastsTest.testCastWithNotFoundError");
+    }
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/CastsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/ClinitTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/ClinitTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/ClinitTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/ClinitTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,47 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class ClinitTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+//SIDEEFFECTS
+
+    public void testClinit1() throws Throwable {
+        getClassLoader().runTest(this, "ClinitTest.testClinit1");
+    }
+
+    public void testClinit2() throws Throwable {
+        getClassLoader().runTest(this, "ClinitTest.testClinit2");
+    }
+
+    public void testClinit3() throws Throwable {
+        getClassLoader().runTest(this, "ClinitTest.testClinit3");
+    }
+
+    public void testClinit4() throws Throwable {
+        getClassLoader().runTest(this, "ClinitTest.testClinit4");
+    }
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/ClinitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/FieldsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/FieldsTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/FieldsTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/FieldsTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,151 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class FieldsTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+
+//FIELDS
+    public void testStaticGet1() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGet1");
+    }
+
+    public void testStaticGet2() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGet2");
+    }
+
+    public void testStaticGet3() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGet3");
+    }
+
+    public void testStaticGet4() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGet4");
+    }
+
+    public void testStaticGetWithNotFoundError() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGetWithNotFoundError");
+    }
+
+    public void testStaticPut1() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticPut1");
+    }
+
+    public void testStaticPut2() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticPut2");
+    }
+
+    public void testStaticPut3() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticPut3");
+    }
+
+    public void testStaticPut4() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticPut4");
+    }
+
+    public void testNonStaticGet1() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticGet1");
+    }
+
+    public void testNonStaticGet2() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticGet2");
+    }
+
+    public void testNonStaticGet3() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticGet3");
+    }
+
+    public void testNonStaticGet4() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticGet4");
+    }
+
+    public void testNonStaticPut1() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticPut1");
+    }
+
+    public void testNonStaticPut2() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticPut2");
+    }
+
+    public void testNonStaticPut3() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticPut3");
+    }
+
+    public void testNonStaticPut4() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticPut4");
+    }
+
+    public void testStaticGetBroken1() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGetBroken1");
+    }
+
+    public void testStaticPutBroken1() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticPutBroken1");
+    }
+
+
+    public void testNonStaticGetBroken1() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGetBroken1");
+    }
+
+    public void testNonStaticPutBroken1() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticPutBroken1");
+    }
+
+    public void testStaticGetBroken2() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGetBroken2");
+    }
+
+    public void testStaticPutBroken2() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticPutBroken2");
+    }
+
+
+    public void testNonStaticGetBroken2() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGetBroken2");
+    }
+
+    public void testNonStaticPutBroken2() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticPutBroken2");
+    }
+
+    public void testStaticGetBroken3() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticGetBroken3");
+    }
+
+    public void testStaticPutBroken3() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testStaticPutBroken3");
+    }
+
+    public void testNonStaticGetBroken3() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticGetBroken3");
+    }
+
+
+    public void testNonStaticPutBroken3() throws Throwable {
+        getClassLoader().runTest(this, "FieldsTest.testNonStaticPutBroken3");
+    }
+
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/FieldsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InstanceOfTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InstanceOfTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InstanceOfTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InstanceOfTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class InstanceOfTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+
+//INSTANCEOF
+    public void testInstanceOf1() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOf1");
+    }
+
+    public void testInstanceOf2() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOf2");
+    }
+
+    public void testInstanceOf3() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOf3");
+    }
+
+    public void testInstanceOf4() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOf4");
+    }
+
+    public void testInstanceOf5() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOf5");
+    }
+
+    public void testInstanceOf6() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOf6");
+    }
+
+    public void testInstanceOf7() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOf7");
+    }
+
+    public void testInstanceOf8() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOf8");
+    }
+
+    public void testInstanceOfWithNotFoundError() throws Throwable {
+        getClassLoader().runTest(this, "InstanceOfTest.testInstanceOfWithNotFoundError");
+    }
+
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InstanceOfTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InterfaceCallsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InterfaceCallsTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InterfaceCallsTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InterfaceCallsTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class InterfaceCallsTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+
+    public void testInvokeInterface1() throws Throwable {
+        getClassLoader().runTest(this, "InterfaceCallsTest.testInvokeInterface1");
+    }
+
+    public void testInvokeInterface2() throws Throwable {
+        getClassLoader().runTest(this, "InterfaceCallsTest.testInvokeInterface2");
+    }
+
+    public void testInvokeInterface3() throws Throwable {
+        getClassLoader().runTest(this, "InterfaceCallsTest.testInvokeInterface3");
+    }
+
+    public void testInvokeInterfaceBroken1() throws Throwable {
+        getClassLoader().runTest(this, "InterfaceCallsTest.testInvokeInterfaceBroken1");
+    }
+
+    public void testInvokeInterfaceBroken2() throws Throwable {
+        getClassLoader().runTest(this, "InterfaceCallsTest.testInvokeInterfaceBroken2");
+    }
+
+    public void testInvokeInterfaceBroken3() throws Throwable {
+        getClassLoader().runTest(this, "InterfaceCallsTest.testInvokeInterfaceBroken3");
+    }
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/InterfaceCallsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/OptimizerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/OptimizerTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/OptimizerTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/OptimizerTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class OptimizerTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+//OPTIMIZATIONS
+
+    public void testIfSimplifier1() throws Throwable {
+        getClassLoader().runTest(this, "OptimizerTest.testIfSimplifier1");
+    }
+
+
+    public void testIfSimplifier2() throws Throwable {
+        getClassLoader().runTest(this, "OptimizerTest.testIfSimplifier2");
+    }
+
+    public void testIfSimplifier3() throws Throwable {
+        getClassLoader().runTest(this, "OptimizerTest.testIfSimplifier3");
+    }
+
+   public void testDevirt1() throws Throwable {
+        getClassLoader().runTest(this, "OptimizerTest.testDevirt1");
+    }
+
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/OptimizerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/SignatureTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/SignatureTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/SignatureTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/SignatureTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,90 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class SignatureTest extends TestCase {
+
+    public LazyClassLoader getClassLoader() {
+        return new LazyClassLoader(Thread.currentThread().getContextClassLoader());
+    }
+
+//SIGNATURE
+
+    public void testReturn1() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testReturn1");
+    }
+
+    public void testReturn2() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testReturn2");
+    }
+    
+    public void testReturn3() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testReturn3");
+    }
+
+
+    public void testParams1() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testParams1");
+    }
+
+    public void testParams2() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testParams2");
+    }
+
+    public void testParams3() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testParams3");
+    }
+
+
+    public void testParams4() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testParams4");
+    }
+
+
+    public void testParams5() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testParams5");
+    }
+
+    public void testExceptions1() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testExceptions1");
+    }
+
+    public void testExceptions2() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testExceptions2");
+    }
+
+    public void testExceptions3() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testExceptions3");
+    }
+
+    public void testExceptions4() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testExceptions4");
+    }
+
+    public void testExceptions5() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testExceptions5");
+    }
+
+    public void testExceptions6() throws Throwable {
+        getClassLoader().runTest(this, "SignatureTest.testExceptions6");
+    }
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/SignatureTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java Tue May 20 03:49:08 2008
@@ -0,0 +1,157 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.classloader;
+
+import java.io.*;
+import java.util.*;
+import java.lang.reflect.*;
+import junit.framework.*;
+
+public class LazyClassLoader extends ClassLoader {
+
+    public static final String DATA_PACKAGE_PREFIX = "org.apache.harmony.vm.test.lazyresolution.data.";
+
+    public int numLoads = 0;
+    
+    private Set<String> hiddenClasses = new HashSet<String>();
+    private List<String> loadedInTest = new ArrayList<String>();
+    public boolean useBrokenPackage = false;
+
+    private ClassLoader cl = null;
+
+    public LazyClassLoader(ClassLoader cl) {
+        this.cl = cl;
+    }
+
+    public Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
+        //System.err.println("LOAD1:"+name);
+        if (name.startsWith(DATA_PACKAGE_PREFIX)) {
+            if (hiddenClasses.contains(name)) {
+                throw new ClassNotFoundException("Error while loading class: "+name);
+            }
+            //System.err.println("LOAD2:"+name);
+//            new Exception().printStackTrace();
+            numLoads++;
+            loadedInTest.add(name.substring(DATA_PACKAGE_PREFIX.length()));
+
+            switch(numLoads) { 
+                //Special check to force recursive compilation. 
+                //Simplifies debugging of Jitrino.OPT
+                case 1: foo1(); break;
+                case 2: foo2(); break;
+                case 3: foo3(); break;
+                case 4: foo4(); break;
+                case 5: foo5(); break;
+                case 6: foo6(); break;
+            }
+            return loadFromStream(name);
+        } 
+        return cl.loadClass(name);
+    }
+
+    private static long time;
+    private static void foo1(){time = System.currentTimeMillis();}
+    private static void foo2(){time = System.currentTimeMillis();}
+    private static void foo3(){time = System.currentTimeMillis();}
+    private static void foo4(){time = System.currentTimeMillis();}
+    private static void foo5(){time = System.currentTimeMillis();}
+    private static void foo6(){time = System.currentTimeMillis();}
+
+    private Class loadFromStream(String name) throws ClassNotFoundException {
+        String resourceName = name.replace(".", "/") + ".class";
+        if (useBrokenPackage) {
+            resourceName = "broken/"+resourceName;
+        }
+        InputStream is = cl.getResourceAsStream(resourceName);
+        try {
+            int length = is.available();
+            byte[] buf = new byte[length];
+            int readLength = is.read(buf);
+            return defineClass(name, buf, 0, length);
+        } catch (Throwable t) {
+            t.printStackTrace();
+            throw new ClassNotFoundException("Error while loading class: "+name ,t);
+        }
+    }
+
+    public void runTest(TestCase junit, String testNameWithClassSuffix) throws Throwable {
+        try {
+            int dot = testNameWithClassSuffix.indexOf('.');
+            String testName = testNameWithClassSuffix.substring(dot+1);
+            String classSuffix = testNameWithClassSuffix.substring(0, dot);
+//            System.err.println("CREATE TEST");
+            Object test = newTest(junit, classSuffix);
+//            System.err.println("FIND METHOD");
+            Method method = test.getClass().getMethod(testName, (Class[])null);
+//            System.err.println("FIND INVOKE");
+            method.invoke(test);
+        } catch (InvocationTargetException e) {
+            throw e.getCause();
+        }
+    }
+ 
+
+    private Class testClass;
+    public Object newTest(TestCase junitTest, String classSuffix) throws Exception {
+        Constructor<TestCase> c = getTestClass(classSuffix).getConstructor();
+        Object res = c.newInstance();
+        return res;
+    }
+    
+    public Class<TestCase> getTestClass(String classSuffix) throws Exception {
+        if (testClass == null) {
+            testClass = loadClass(DATA_PACKAGE_PREFIX +classSuffix);
+        }
+        return testClass;
+    }
+    
+    public Test newTest(String classSuffix) throws Exception {
+        Constructor<TestCase> c = getTestClass(classSuffix).getConstructor();
+        Test res = c.newInstance();
+        return res;
+    }
+
+    public void hideClass(String name) {
+        String className = DATA_PACKAGE_PREFIX + name;
+        hiddenClasses.add(className);
+    }
+
+    public void restoreClass(String name) {
+        String className = DATA_PACKAGE_PREFIX + name;
+        hiddenClasses.remove(className);
+    }
+
+
+    public void startTest() {
+       loadedInTest.clear();
+       numLoads = 0;
+    }
+
+    public void endTest() {
+       System.out.println("loaded:" +loadedInTest);
+    }
+
+    public void assertNumLoads(int expected) {
+        //Assert.assertTrue((start);
+    }
+
+    public void assertLoaded(String name) throws Throwable {
+        Assert.assertTrue(name + " is not in " + loadedInTest, loadedInTest.contains(name));
+    }
+
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/classloader/LazyClassLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/AllocationTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/AllocationTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/AllocationTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/AllocationTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,283 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+
+import org.apache.harmony.vm.test.lazyresolution.data.*;
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+
+public class AllocationTest extends LazyTest {
+    
+    //opcode new + invokespecial<init> call
+    public void testNewObj1() {
+        int before = getNumLoads();
+
+        new LazyObject1();
+
+        int after = getNumLoads();
+        Assert.assertEquals(1, after-before);
+    }
+
+    private Object createObject(boolean object2) {
+        if (object2) {
+            return new LazyObject2();
+        } 
+        return new LazyObject3();
+//        return object2 ? new LazyObject2() : new LazyObject3(); -> dont use it. RI's verifier will load both classes!
+    }
+
+
+    public void testNewObj2() {
+        int before = getNumLoads();
+        createObject(true);
+
+        int after = getNumLoads();
+        Assert.assertEquals(2, after-before);
+
+    }
+
+    public void testNewObj3() {
+        int before = getNumLoads();
+
+        createObject(false);
+
+        int after = getNumLoads();
+        Assert.assertEquals(3, after-before);
+    }
+
+
+    public void testNewObj4() {
+        hideClass("LazyObject1");
+        try {
+            new LazyObject1();
+            Assert.fail("NoClassDefFoundError expected");
+        } catch (NoClassDefFoundError e) {
+        }
+    } 
+
+    public void testNewObj5() {
+        hideClass("LazyInterface2");
+        try {
+            new LazyObject2();
+            Assert.fail("NoClassDefFoundError expected");
+        } catch (NoClassDefFoundError e) {
+        } 
+    } 
+
+
+    public void testNewObjInLoop() {
+        int before = getNumLoads();
+
+        for (int i=0;i<100;i++) {
+            new LazyObject1();
+        }
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+    }
+
+
+    //opcode new + invokespecial<init> call
+    public void testNewObjBroken1() {
+        setBrokenObjects(true);
+
+        try {        
+            new LazyObject1();
+            Assert.fail("IllegalAccessError expected");
+        } catch (IllegalAccessError e) {
+        }
+    }
+
+    public void testNewObjBroken2() {
+        setBrokenObjects(true);
+
+        boolean passed = false;
+        try {        
+            new LazyObject2();
+        } catch (InstantiationError e) {
+            passed = true;
+        }
+
+        Assert.assertTrue(passed);
+    }
+
+    public void testNewObjBroken3() {
+        setBrokenObjects(true);
+
+        boolean passed = false;
+        try {        
+            new LazyObject1(100, 200);
+        } catch (NoSuchMethodError e) {
+            passed = true;
+        }
+
+        Assert.assertTrue(passed);
+    }
+
+    public void testNewArray1() {
+        int before = getNumLoads();
+
+        LazyObject1[] arr = new LazyObject1[10];
+
+        int after = getNumLoads();
+        Assert.assertEquals(1, after-before);
+        Assert.assertEquals(10, arr.length);
+    }
+
+    public void testNewArray2() {
+        boolean passed = false;
+        try {
+            LazyObject1[] arr = new LazyObject1[-1];
+        } catch (NegativeArraySizeException e) {
+            passed = true;
+        }
+        Assert.assertTrue(passed);
+    }
+
+    public void testNewArray3() {
+        hideClass("LazyObject1");
+        boolean passed = false;
+        try {
+            LazyObject1[] arr = new LazyObject1[10];
+        } catch (NoClassDefFoundError e) {
+            passed=true;
+        }
+        Assert.assertTrue(passed);
+    } 
+
+    public void testNewArray4() {
+        hideClass("LazyInterface2");
+        boolean passed = false;
+        try {
+            LazyObject2[] arr = new LazyObject2[10];
+        } catch (NoClassDefFoundError e) {
+            passed=true;
+        }
+        Assert.assertTrue(passed);
+    } 
+
+
+    public void testNewArray5() {
+        boolean passed = false;
+        try {
+            LazyObject2[] arr = new LazyObject2[2*1000*1000*1000];
+        } catch (OutOfMemoryError e) {
+            passed = true;
+        }
+        Assert.assertTrue(passed);
+    } 
+
+
+    public void testNewArray6() {
+        int before = getNumLoads();
+
+        LazyObject1[] arr = new LazyObject1[10];
+        LazyObject1 o = new LazyObject1();
+        arr[1] = o;
+
+        int after = getNumLoads();
+        Assert.assertEquals(1, after-before);
+        Assert.assertEquals(10, arr.length);
+        Assert.assertEquals(o, arr[1]);
+    }
+
+     public void testNewMultiArray1() {
+        int before = getNumLoads();
+
+        LazyObject1[][] arr = new LazyObject1[10][20];
+
+        int after = getNumLoads();
+        Assert.assertEquals(1, after-before);
+        Assert.assertEquals(10, arr.length);
+        Assert.assertEquals(20, arr[0].length);
+    }
+
+     public void testNewMultiArray2() {
+        boolean passed = false;
+        try {
+            LazyObject1[][] arr = new LazyObject1[10][-1];
+        } catch (NegativeArraySizeException e) {
+            passed = true;
+        }
+        Assert.assertTrue(passed);
+    }
+
+     public void testNewMultiArray3() {
+        boolean passed = false;
+        try {
+            LazyObject1[][] arr = new LazyObject1[-1][-1];
+        } catch (NegativeArraySizeException e) {
+            passed = true;
+        }
+        Assert.assertTrue(passed);
+    }
+
+
+     public void testNewMultiArray4() {
+        int before = getNumLoads();
+
+        LazyObject1[][] arr = new LazyObject1[10][];
+
+        int after = getNumLoads();
+        Assert.assertEquals(1, after-before);
+        Assert.assertEquals(10, arr.length);
+        Assert.assertEquals(null, arr[0]);
+    }
+
+    public void testNewMultiArray5() {
+        hideClass("LazyInterface2");
+        boolean passed = false;
+        try {
+            LazyObject2[][] arr = new LazyObject2[10][10];
+        } catch (NoClassDefFoundError e) {
+            passed=true;
+        }
+        Assert.assertTrue(passed);
+    } 
+
+
+    public void testNewMultiArray6() {
+        boolean passed = false;
+        try {
+            LazyObject2[][] arr = new LazyObject2[2*1000][1000*1000];
+        } catch (OutOfMemoryError e) {
+            passed = true;
+        }
+        Assert.assertTrue(passed);
+    } 
+
+     public void testNewMultiArray7() {
+        int before = getNumLoads();
+
+        LazyObject1[][] arr = new LazyObject1[10][];
+        LazyObject1[] ar = new LazyObject1[11];
+        LazyObject1 o = new LazyObject1();
+        ar[0]=o;
+        arr[7]=ar;
+
+        int after = getNumLoads();
+        Assert.assertEquals(1, after-before);
+        Assert.assertEquals(10, arr.length);
+        Assert.assertEquals(null, arr[0]);
+        Assert.assertEquals(ar, arr[7]);
+        Assert.assertEquals(o, arr[7][0]);
+    }
+
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/AllocationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CallsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CallsTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CallsTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CallsTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,150 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+import org.apache.harmony.vm.test.lazyresolution.data.*;
+
+
+//separate this class from InterfaceCallsTest :
+//  verifier loads all interfaces for all invokeinterface bytecodes found in a class
+//  this makes getNumLoads depend if any method in a class has interface calls.
+//  in the methods of this class it's expected that all interfaces are NOT loaded
+public class CallsTest extends LazyTest {
+
+     //call a static method
+    public void testInvokeStatic1() {
+        int before = getNumLoads();
+
+        LazyObject1.getIntStaticField();
+        
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+    }
+
+    public void testInvokeStaticWithNotFoundError() {
+        hideClass("LazyObject1");
+        boolean wasCNFE = false;
+        try {
+            LazyObject1.getIntStaticField();
+        } catch (NoClassDefFoundError e) {
+            wasCNFE=true;
+        } finally {
+            restoreClass("LazyObject1");
+        }
+        Assert.assertTrue(wasCNFE);
+    } 
+
+    public void testInvokeStaticBroken1() {
+        setBrokenObjects(true);
+        boolean passed = false;
+        try {
+            LazyObject1.getIntStaticField();
+        } catch (IllegalAccessError e) {
+            passed = true;            
+        }
+        Assert.assertTrue(passed);
+    }
+
+    public void testInvokeStaticBroken2() {
+        setBrokenObjects(true);
+        boolean passed = false;
+        try {
+            LazyObject1.getIntStaticField2();
+        } catch (NoSuchMethodError e) {
+            passed = true;            
+        }
+        Assert.assertTrue(passed);
+    }
+
+
+     //call a virtual method
+    public void testInvokeVirtual1() {
+        int before = getNumLoads();
+
+        LazyObject1 o = new LazyObject1();
+        o.virtualCall();
+        
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+    }
+
+
+   //call an interface method
+    public void testInvokeVirtual2() {
+        int before = getNumLoads();
+
+        LazyObject2 o = new LazyObject2();
+        o.interfaceCall2(); //known object type -> invokevirtual
+        
+        int after = getNumLoads();
+
+        Assert.assertEquals(2, after-before);
+    }
+
+    //call an interface method
+    public void testInvokeVirtual3() {
+        int before = getNumLoads();
+
+        LazyObject3 o = new LazyObject3();
+        o.interfaceCall2();//known object type -> invokevirtual
+        o.interfaceCall3();//known object type -> invokevirtual
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(3, after-before);
+        Assert.assertEquals(120, LazyObject3.intStaticField);
+    }
+
+
+    public void _testInvokeVirtualBroken1() {
+        LazyObject1 o = new LazyObject1(100);
+        o.getIntField();
+    }
+
+    public void testInvokeVirtualBroken1() {
+        setBrokenObjects(true);
+        boolean passed = false;
+        try {
+            _testInvokeVirtualBroken1(); //if this method is inlined LazyObject1 class is loaded by RI's verifier
+        } catch (IllegalAccessError e) {
+            passed = true;            
+        }
+        Assert.assertTrue(passed);
+    }
+
+    public void _testInvokeVirtualBroken2() {
+        LazyObject1 o = new LazyObject1(100);
+        o.getIntField2();
+    }
+
+    public void testInvokeVirtualBroken2() {
+        setBrokenObjects(true);
+        boolean passed = false;
+        try {
+            _testInvokeVirtualBroken2(); //if this method is inlined LazyObject1 class is loaded by RI's verifier
+        } catch (NoSuchMethodError e) {
+            passed = true;            
+        }
+        Assert.assertTrue(passed);
+    }
+
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CallsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CastsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CastsTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CastsTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CastsTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,185 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+import org.apache.harmony.vm.test.lazyresolution.data.*;
+
+public class CastsTest extends LazyTest {
+
+
+    public void testCast1() {
+        int before = getNumLoads();
+
+        LazyInterface2 i2 = new LazyObject2();
+        LazyObject2 o2 = (LazyObject2)i2;
+
+        Assert.assertEquals(o2.getClass(), LazyObject2.class);
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(2, after-before);
+    }
+
+    private Object _testCast2() {
+        Object i2 = new LazyObject2();
+        return (LazyObject1)i2;
+    }
+
+    public void testCast2() {
+
+        int before = getNumLoads();
+
+        boolean passed = false;
+        try {
+            _testCast2();
+        } catch (ClassCastException e) {
+            passed = true;            
+        }
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(3, after-before);
+        Assert.assertTrue(passed);
+    }
+
+    void _testCast3(Object o) {
+        LazyObject1[] arr = (LazyObject1[])o;
+        if (arr.length!=10) {
+            throw new RuntimeException();
+        }
+    }
+
+    public void testCast3() {
+        int before = getNumLoads();
+
+        Object o = new LazyObject1[10];
+        _testCast3(o);
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+    }
+
+    public void testCast4() {
+        int before = getNumLoads();
+
+        boolean passed = false;
+        Object o = new LazyObject1();
+        try {
+            _testCast3(o);
+        } catch (ClassCastException e) {
+            passed = true;            
+        }
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+        Assert.assertTrue(passed);
+    }
+
+    public void testCast5() {
+        int before = getNumLoads();
+
+        boolean passed = false;
+        Object o = new LazyObject1[10][20];
+        try {
+            _testCast3(o);
+        } catch (ClassCastException e) {
+            passed = true;            
+        }
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+        Assert.assertTrue(passed);
+    }
+
+
+
+    void _testCast6(Object o) {
+        LazyObject1[][] arr = (LazyObject1[][])o;
+        if (arr.length!=10) {
+            throw new RuntimeException();
+        }
+        if (arr[9].length!=20) {
+            throw new RuntimeException();
+        }
+    }
+
+
+    public void testCast6() {
+        int before = getNumLoads();
+
+        Object o = new LazyObject1[10][20];
+        _testCast6(o);
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+    }
+
+    public void testCast7() {
+        int before = getNumLoads();
+
+        boolean passed = false;
+        Object o = new LazyObject1();
+        try {
+            _testCast6(o);
+        } catch (ClassCastException e) {
+            passed = true;            
+        }
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+        Assert.assertTrue(passed);
+    }
+
+    public void testCast8() {
+        int before = getNumLoads();
+
+        boolean passed = false;
+        Object o = new LazyObject1[10];
+        try {
+            _testCast6(o);
+        } catch (ClassCastException e) {
+            passed = true;            
+        }
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before);
+        Assert.assertTrue(passed);
+    }
+
+   public void testCastWithNotFoundError() {
+        boolean passed = false;
+
+        hideClass("LazyObject1");
+        try  {
+            _testCast2();
+        } catch (NoClassDefFoundError e) {
+            passed = true;
+        }
+        restoreClass("LazyObject1");
+        Assert.assertTrue(passed);
+    }
+
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/CastsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/ClinitTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/ClinitTest.java?rev=658196&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/ClinitTest.java (added)
+++ harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/ClinitTest.java Tue May 20 03:49:08 2008
@@ -0,0 +1,74 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.harmony.vm.test.lazyresolution.data;
+
+import junit.framework.*;
+import org.apache.harmony.vm.test.lazyresolution.classloader.*;
+import org.apache.harmony.vm.test.lazyresolution.data.*;
+
+public class ClinitTest extends LazyTest {
+
+    public void testClinit1() {
+        int before = getNumLoads();
+
+        int value = LazyObject1.intStaticField;
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(value, 10);
+        Assert.assertEquals(after-before, 1);
+    }
+
+
+    public void testClinit2() {
+        int before = getNumLoads();
+
+        int value = LazyObject2.intStaticField;
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(10, value);
+        Assert.assertEquals(2, after-before); //LazyObject2 + LazyInterface1 inits
+    }
+
+ 
+    public void testClinit3() {
+        int before = getNumLoads();
+
+        int value = LazyInterface2.intStaticField;
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before); 
+        Assert.assertEquals(12, value); 
+    }
+
+    public void testClinit4() {
+        int before = getNumLoads();
+
+        int value1 = LazyObject1.intStaticField;
+        int value2 = new LazyObject1().intField; //this helper has assertion that class is initialized
+
+        int after = getNumLoads();
+
+        Assert.assertEquals(1, after-before); 
+        Assert.assertEquals(10, value1); 
+        Assert.assertEquals(20, value2); 
+    }
+ 
+}

Propchange: harmony/enhanced/drlvm/trunk/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/ClinitTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message