< prev index next >

test/runtime/valhalla/valuetypes/ValueTypeCreation.java

Print this page
rev 10545 : remove -Xint from runtime tests + force TieredCompilation off
rev 10546 : runtime tests with -Xcomp
   1 package runtime.valhalla.valuetypes;
   2 
   3 import jdk.test.lib.Asserts;
   4 
   5 /*
   6  * @test ValueTypeCreation
   7  * @summary Value Type creation test
   8  * @library /testlibrary /
   9  * @run main/othervm -noverify -Xint runtime.valhalla.valuetypes.ValueTypeCreation

  10  */
  11 public class ValueTypeCreation {
  12     public static void main(String[] args) {
  13         ValueTypeCreation valueTypeCreation = new ValueTypeCreation();
  14         valueTypeCreation.run();
  15     }
  16 
  17     public void run() {
  18         testPoint();
  19         testLong8();
  20         // Embedded oops not yet supported
  21         //testPerson();
  22     }
  23 
  24     void testPoint() {
  25         Point p = Point.createPoint(1, 2);
  26         Asserts.assertEquals(p.x, 1, "invalid point x value");
  27         Asserts.assertEquals(p.y, 2, "invalid point y value");
  28         Point p2 = clonePoint(p);
  29         Asserts.assertEquals(p2.x, 1, "invalid point clone x value");


   1 package runtime.valhalla.valuetypes;
   2 
   3 import jdk.test.lib.Asserts;
   4 
   5 /*
   6  * @test ValueTypeCreation
   7  * @summary Value Type creation test
   8  * @library /testlibrary /
   9  * @run main/othervm -noverify -Xint runtime.valhalla.valuetypes.ValueTypeCreation
  10  * @run main/othervm -noverify -Xcomp runtime.valhalla.valuetypes.ValueTypeCreation
  11  */
  12 public class ValueTypeCreation {
  13     public static void main(String[] args) {
  14         ValueTypeCreation valueTypeCreation = new ValueTypeCreation();
  15         valueTypeCreation.run();
  16     }
  17 
  18     public void run() {
  19         testPoint();
  20         testLong8();
  21         // Embedded oops not yet supported
  22         //testPerson();
  23     }
  24 
  25     void testPoint() {
  26         Point p = Point.createPoint(1, 2);
  27         Asserts.assertEquals(p.x, 1, "invalid point x value");
  28         Asserts.assertEquals(p.y, 2, "invalid point y value");
  29         Point p2 = clonePoint(p);
  30         Asserts.assertEquals(p2.x, 1, "invalid point clone x value");


< prev index next >