< prev index next >

test/runtime/valhalla/valuetypes/VWithFieldTest.java

Print this page
rev 10541 : remove -Xint from runtime tests + force TieredCompilation off


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package runtime.valhalla.valuetypes;
  25 
  26 import jdk.test.lib.Asserts;
  27 
  28 /*
  29  * @test VWithFieldTest
  30  * @summary vwithfield bytecode test
  31  * @library /testlibrary /
  32  * @run main/othervm -noverify -Xint runtime.valhalla.valuetypes.VWithFieldTest
  33  */
  34 
  35 public class VWithFieldTest {
  36 
  37     static __ByValue final class Point {
  38         final private int x;
  39         final private int y;
  40         
  41         __ValueFactory static Point make(int x, int y) {
  42             Point p = __MakeDefault Point();
  43             Asserts.assertEquals(p.x, 0, "invalid x default value");
  44             Asserts.assertEquals(p.y, 0, "invalid y default value");
  45             p.x = x;
  46             Asserts.assertEquals(p.x, x, "invalid x value");
  47             Asserts.assertEquals(p.y, 0, "invalid y value");
  48             p.y = y;
  49             Asserts.assertEquals(p.x, x, "invalid x value");
  50             Asserts.assertEquals(p.y, y, "invalid y value");
  51             return p;
  52         }




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package runtime.valhalla.valuetypes;
  25 
  26 import jdk.test.lib.Asserts;
  27 
  28 /*
  29  * @test VWithFieldTest
  30  * @summary vwithfield bytecode test
  31  * @library /testlibrary /
  32  * @run main/othervm -noverify runtime.valhalla.valuetypes.VWithFieldTest
  33  */
  34 
  35 public class VWithFieldTest {
  36 
  37     static __ByValue final class Point {
  38         final private int x;
  39         final private int y;
  40         
  41         __ValueFactory static Point make(int x, int y) {
  42             Point p = __MakeDefault Point();
  43             Asserts.assertEquals(p.x, 0, "invalid x default value");
  44             Asserts.assertEquals(p.y, 0, "invalid y default value");
  45             p.x = x;
  46             Asserts.assertEquals(p.x, x, "invalid x value");
  47             Asserts.assertEquals(p.y, 0, "invalid y value");
  48             p.y = y;
  49             Asserts.assertEquals(p.x, x, "invalid x value");
  50             Asserts.assertEquals(p.y, y, "invalid y value");
  51             return p;
  52         }


< prev index next >