forked from ikvmnet/ikvm
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
50 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using IKVM.Tests.Util; | ||
|
||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace IKVM.Tests.Java.java.lang | ||
{ | ||
|
||
|
||
[TestClass] | ||
public class ClassTests | ||
{ | ||
|
||
[TestMethod] | ||
public void Can_get_method_and_invoke() | ||
{ | ||
var s = new StreamReader(typeof(ClassTests).Assembly.GetManifestResourceStream("IKVM.Tests.Java.java.lang.ClassTests.java")).ReadToEnd(); | ||
var f = new InMemoryCodeUnit("ikvm.tests.java.lang.ClassTests", s); | ||
var c = new InMemoryCompiler(new[] { f }); | ||
c.Compile(); | ||
var z = c.GetClass("ikvm.tests.java.lang.ClassTests"); | ||
if (z == null) | ||
throw new Exception(); | ||
|
||
var m = z.getMethod("main", new global::java.lang.Class[] { typeof(string[]) }); | ||
m.invoke(null, new object[] { new string[] { "TEST" } }); | ||
} | ||
|
||
} | ||
|
||
} |
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,11 @@ | ||
package ikvm.tests.java.lang; | ||
|
||
public class ClassTests | ||
{ | ||
|
||
public static void main(String[] args) | ||
{ | ||
|
||
} | ||
|
||
} |