1 package runtime.valhalla.valuetypes;
2
3 import jdk.test.lib.Asserts;
4
5 /*
6 * @test InvokeDirect
7 * @summary Value Type invokedirect bytecode test (incomplete until type system defn done)
8 * @library /testlibrary /
9 * @run main/othervm -noverify -Xint runtime.valhalla.valuetypes.InvokeDirect
10 */
11 public class InvokeDirect {
12 public static void main(String[] args) {
13 InvokeDirect invokeDirect = new InvokeDirect();
14 invokeDirect.run();
15 }
16
17 public void run() {
18 testPoint();
19 }
20
21 public void testPoint() {
22 int x = 1;
23 int y = 2;
24 Point p = Point.createPoint(x, y);
25 Asserts.assertEquals(x, p.getX(), "Method result invalid");
26 Asserts.assertEquals(y, p.getY(), "Method result invalid");
27
28 // Just check we can call this...
29 String s = p.toString();
|
1 package runtime.valhalla.valuetypes;
2
3 import jdk.test.lib.Asserts;
4
5 /*
6 * @test InvokeDirect
7 * @summary Value Type invokedirect bytecode test (incomplete until type system defn done)
8 * @library /testlibrary /
9 * @run main/othervm -noverify -Xint runtime.valhalla.valuetypes.InvokeDirect
10 * @run main/othervm -noverify -Xcomp runtime.valhalla.valuetypes.InvokeDirect
11 */
12 public class InvokeDirect {
13 public static void main(String[] args) {
14 InvokeDirect invokeDirect = new InvokeDirect();
15 invokeDirect.run();
16 }
17
18 public void run() {
19 testPoint();
20 }
21
22 public void testPoint() {
23 int x = 1;
24 int y = 2;
25 Point p = Point.createPoint(x, y);
26 Asserts.assertEquals(x, p.getX(), "Method result invalid");
27 Asserts.assertEquals(y, p.getY(), "Method result invalid");
28
29 // Just check we can call this...
30 String s = p.toString();
|