< prev index next >

test/runtime/valhalla/valuetypes/ValueTypeCreation.java

Print this page
rev 10541 : remove -Xint from runtime tests + force TieredCompilation off
   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 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");


< prev index next >