|
From: <ls...@us...> - 2009-07-12 19:52:17
|
Revision: 5604
http://jnode.svn.sourceforge.net/jnode/?rev=5604&view=rev
Author: lsantha
Date: 2009-07-12 19:52:16 +0000 (Sun, 12 Jul 2009)
Log Message:
-----------
Fixed compiler test.
Modified Paths:
--------------
trunk/core/src/test/org/jnode/test/core/CompilerTest.java
Modified: trunk/core/src/test/org/jnode/test/core/CompilerTest.java
===================================================================
--- trunk/core/src/test/org/jnode/test/core/CompilerTest.java 2009-07-11 16:46:24 UTC (rev 5603)
+++ trunk/core/src/test/org/jnode/test/core/CompilerTest.java 2009-07-12 19:52:16 UTC (rev 5604)
@@ -43,6 +43,9 @@
import org.jnode.vm.x86.compiler.l1a.X86Level1ACompiler;
/**
+ * Bytecode to native compiler test.
+ * Runt this class in the root directory of the JNode source tree.
+ *
* @author epr
*/
public class CompilerTest {
@@ -70,8 +73,9 @@
// "org.jnode.vm.SoftByteCodes",
// "org.jnode.vm.VmSystem",
// "org.jnode.vm.VmStacReader",
- "org.jnode.vm.classmgr.VmType",
+// "org.jnode.vm.classmgr.VmType",
// "org.jnode.test.ArrayLongTest",
+ "org.jnode.test.ArrayTest",
// "org.jnode.test.Linpack",
// "org.jnode.test.MultiANewArrayTest",
// "org.jnode.test.Sieve",
@@ -111,11 +115,16 @@
} else {
arch = new VmX86Architecture32();
}
- final VmSystemClassLoader cl = new VmSystemClassLoader(new File(dir)
- .toURL(), arch);
- VmType.initializeForBootImage(cl);
+ File classes = new File("./core/build/classes/").getCanonicalFile();
+ File classlib = new File("./all/lib/classlib.jar").getCanonicalFile();
+ final VmSystemClassLoader cl = new VmSystemClassLoader(new java.net.URL[]{
+ classes.toURI().toURL(),
+ new java.net.URL("jar:"+ classlib.toURI().toURL() + "!/"),
+ }, arch);
+
final Vm vm = new Vm("?", arch, cl.getSharedStatics(), false, cl, null);
vm.toString();
+ VmType.initializeForBootImage(cl);
System.out.println("Architecture: " + arch.getFullName());
//final ObjectResolver resolver = new DummyResolver();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|