forked from onlyliuxin/coding2017
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Patrick
authored and
Patrick
committed
Apr 26, 2017
1 parent
9c1f2f4
commit 2c0eaa6
Showing
8 changed files
with
56 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
group24/121111914/src/com/github/ipk2015/coding2017/minijvm/test/MiniJVMTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.github.ipk2015.coding2017.minijvm.test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import java.io.IOException; | ||
|
||
import org.junit.After; | ||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import com.github.ipk2015.coding2017.minijvm.engine.MiniJVM; | ||
|
||
public class MiniJVMTest { | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
} | ||
|
||
@After | ||
public void tearDown() throws Exception { | ||
} | ||
|
||
@Test | ||
public void test() { | ||
MiniJVM jvm = new MiniJVM(); | ||
String[] classPaths = new String[3]; | ||
classPaths[0] = ClassFileloaderTest.path1; | ||
classPaths[1] = ClassFileloaderTest.path2; | ||
classPaths[2] = ClassFileloaderTest.path3; | ||
String className = "com.coderising.jvm.test.EmployeeV1"; | ||
try { | ||
jvm.run(classPaths, className); | ||
Assert.assertEquals(0,0); | ||
} catch (IOException e) { | ||
// TODO Auto-generated catch block | ||
|
||
e.printStackTrace(); | ||
Assert.assertEquals(0,1); | ||
} | ||
} | ||
|
||
} |