< prev index next >

test/compiler/stable/TestStableByte.java

Print this page
rev 11353 : 8149043: Fix code indentation in test/compiler/stable tests
Reviewed-by:

*** 98,108 **** public @Stable byte v; public static final DefaultValue c = new DefaultValue(); public static byte get() { return c.v; } public static void test() throws Exception { ! byte val1 = get(); c.v = 1; byte val2 = get(); assertEquals(val1, 0); assertEquals(val2, 1); } } --- 98,108 ---- public @Stable byte v; public static final DefaultValue c = new DefaultValue(); public static byte get() { return c.v; } public static void test() throws Exception { ! byte val1 = get(); c.v = 1; byte val2 = get(); assertEquals(val1, 0); assertEquals(val2, 1); } }
*** 128,138 **** public static @Stable byte v; public static final DefaultStaticValue c = new DefaultStaticValue(); public static byte get() { return c.v; } public static void test() throws Exception { ! byte val1 = get(); c.v = 1; byte val2 = get(); assertEquals(val1, 0); assertEquals(val2, 1); } } --- 128,138 ---- public static @Stable byte v; public static final DefaultStaticValue c = new DefaultStaticValue(); public static byte get() { return c.v; } public static void test() throws Exception { ! byte val1 = get(); c.v = 1; byte val2 = get(); assertEquals(val1, 0); assertEquals(val2, 1); } }
*** 178,205 **** public static byte get1() { return c.v[10]; } public static byte[] get2() { return c.v; } public static void test() throws Exception { { c.v = new byte[1]; c.v[0] = 1; byte val1 = get(); ! c.v[0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[1]; c.v[0] = 3; byte val3 = get(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); } { c.v = new byte[20]; c.v[10] = 1; byte val1 = get1(); ! c.v[10] = 2; byte val2 = get1(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[20]; c.v[10] = 3; byte val3 = get1(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); } { c.v = new byte[1]; byte[] val1 = get2(); c.v = new byte[1]; byte[] val2 = get2(); --- 178,205 ---- public static byte get1() { return c.v[10]; } public static byte[] get2() { return c.v; } public static void test() throws Exception { { c.v = new byte[1]; c.v[0] = 1; byte val1 = get(); ! c.v[0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[1]; c.v[0] = 3; byte val3 = get(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); } { c.v = new byte[20]; c.v[10] = 1; byte val1 = get1(); ! c.v[10] = 2; byte val2 = get1(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[20]; c.v[10] = 3; byte val3 = get1(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); } { c.v = new byte[1]; byte[] val1 = get2(); c.v = new byte[1]; byte[] val2 = get2();
*** 218,238 **** public static byte[] get1() { return c.v[0]; } public static byte[][] get2() { return c.v; } public static void test() throws Exception { { c.v = new byte[1][1]; c.v[0][0] = 1; byte val1 = get(); ! c.v[0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[1][1]; c.v[0][0] = 3; byte val3 = get(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); c.v[0] = new byte[1]; c.v[0][0] = 4; byte val4 = get(); assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 4)); } { c.v = new byte[1][1]; byte[] val1 = get1(); c.v[0] = new byte[1]; byte[] val2 = get1(); --- 218,238 ---- public static byte[] get1() { return c.v[0]; } public static byte[][] get2() { return c.v; } public static void test() throws Exception { { c.v = new byte[1][1]; c.v[0][0] = 1; byte val1 = get(); ! c.v[0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[1][1]; c.v[0][0] = 3; byte val3 = get(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); c.v[0] = new byte[1]; c.v[0][0] = 4; byte val4 = get(); assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 4)); } { c.v = new byte[1][1]; byte[] val1 = get1(); c.v[0] = new byte[1]; byte[] val2 = get1();
*** 258,282 **** public static byte[][] get2() { return c.v[0]; } public static byte[][][] get3() { return c.v; } public static void test() throws Exception { { c.v = new byte[1][1][1]; c.v[0][0][0] = 1; byte val1 = get(); ! c.v[0][0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[1][1][1]; c.v[0][0][0] = 3; byte val3 = get(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); c.v[0] = new byte[1][1]; c.v[0][0][0] = 4; byte val4 = get(); assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 4)); c.v[0][0] = new byte[1]; c.v[0][0][0] = 5; byte val5 = get(); assertEquals(val5, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 5)); } { c.v = new byte[1][1][1]; byte[] val1 = get1(); c.v[0][0] = new byte[1]; byte[] val2 = get1(); --- 258,282 ---- public static byte[][] get2() { return c.v[0]; } public static byte[][][] get3() { return c.v; } public static void test() throws Exception { { c.v = new byte[1][1][1]; c.v[0][0][0] = 1; byte val1 = get(); ! c.v[0][0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[1][1][1]; c.v[0][0][0] = 3; byte val3 = get(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); c.v[0] = new byte[1][1]; c.v[0][0][0] = 4; byte val4 = get(); assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 4)); c.v[0][0] = new byte[1]; c.v[0][0][0] = 5; byte val5 = get(); assertEquals(val5, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 5)); } { c.v = new byte[1][1][1]; byte[] val1 = get1(); c.v[0][0] = new byte[1]; byte[] val2 = get1();
*** 309,337 **** public static byte[][][] get3() { return c.v[0]; } public static byte[][][][] get4() { return c.v; } public static void test() throws Exception { { c.v = new byte[1][1][1][1]; c.v[0][0][0][0] = 1; byte val1 = get(); ! c.v[0][0][0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[1][1][1][1]; c.v[0][0][0][0] = 3; byte val3 = get(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); c.v[0] = new byte[1][1][1]; c.v[0][0][0][0] = 4; byte val4 = get(); assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 4)); c.v[0][0] = new byte[1][1]; c.v[0][0][0][0] = 5; byte val5 = get(); assertEquals(val5, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 5)); c.v[0][0][0] = new byte[1]; c.v[0][0][0][0] = 6; byte val6 = get(); assertEquals(val6, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 6)); } { c.v = new byte[1][1][1][1]; byte[] val1 = get1(); c.v[0][0][0] = new byte[1]; byte[] val2 = get1(); --- 309,337 ---- public static byte[][][] get3() { return c.v[0]; } public static byte[][][][] get4() { return c.v; } public static void test() throws Exception { { c.v = new byte[1][1][1][1]; c.v[0][0][0][0] = 1; byte val1 = get(); ! c.v[0][0][0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); c.v = new byte[1][1][1][1]; c.v[0][0][0][0] = 3; byte val3 = get(); assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 3)); c.v[0] = new byte[1][1][1]; c.v[0][0][0][0] = 4; byte val4 = get(); assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 4)); c.v[0][0] = new byte[1][1]; c.v[0][0][0][0] = 5; byte val5 = get(); assertEquals(val5, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 5)); c.v[0][0][0] = new byte[1]; c.v[0][0][0][0] = 6; byte val6 = get(); assertEquals(val6, (isStableEnabled ? (isStableEnabled ? 1 : 2) ! : 6)); } { c.v = new byte[1][1][1][1]; byte[] val1 = get1(); c.v[0][0][0] = new byte[1]; byte[] val2 = get1();
*** 370,380 **** public static byte[] get1() { return (byte[])c.v; } public static void test() throws Exception { { c.v = new byte[1]; ((byte[])c.v)[0] = 1; byte val1 = get(); ! ((byte[])c.v)[0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, 2); } --- 370,380 ---- public static byte[] get1() { return (byte[])c.v; } public static void test() throws Exception { { c.v = new byte[1]; ((byte[])c.v)[0] = 1; byte val1 = get(); ! ((byte[])c.v)[0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, 2); }
*** 397,415 **** public static Object[] get2() { return c.v; } public static void test() throws Exception { { c.v = new byte[1][1]; ((byte[][])c.v)[0][0] = 1; byte val1 = get(); ! ((byte[][])c.v)[0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, 2); } { c.v = new byte[1][1]; c.v[0] = new byte[0]; byte[] val1 = get1(); ! c.v[0] = new byte[0]; byte[] val2 = get1(); assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2))); } { --- 397,415 ---- public static Object[] get2() { return c.v; } public static void test() throws Exception { { c.v = new byte[1][1]; ((byte[][])c.v)[0][0] = 1; byte val1 = get(); ! ((byte[][])c.v)[0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, 2); } { c.v = new byte[1][1]; c.v[0] = new byte[0]; byte[] val1 = get1(); ! c.v[0] = new byte[0]; byte[] val2 = get1(); assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2))); } {
*** 432,458 **** public static byte[][] get2() { return (byte[][])(c.v[0]); } public static Object[][] get3() { return c.v; } public static void test() throws Exception { { ! c.v = new byte[1][1][1]; ((byte[][][])c.v)[0][0][0] = 1; byte val1 = get(); ! ((byte[][][])c.v)[0][0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, 2); } { c.v = new byte[1][1][1]; c.v[0][0] = new byte[0]; byte[] val1 = get1(); ! c.v[0][0] = new byte[0]; byte[] val2 = get1(); assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2))); } { c.v = new byte[1][1][1]; c.v[0] = new byte[0][0]; byte[][] val1 = get2(); ! c.v[0] = new byte[0][0]; byte[][] val2 = get2(); assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2))); } { --- 432,458 ---- public static byte[][] get2() { return (byte[][])(c.v[0]); } public static Object[][] get3() { return c.v; } public static void test() throws Exception { { ! c.v = new byte[1][1][1]; ((byte[][][])c.v)[0][0][0] = 1; byte val1 = get(); ! ((byte[][][])c.v)[0][0][0] = 2; byte val2 = get(); assertEquals(val1, 1); assertEquals(val2, 2); } { c.v = new byte[1][1][1]; c.v[0][0] = new byte[0]; byte[] val1 = get1(); ! c.v[0][0] = new byte[0]; byte[] val2 = get1(); assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2))); } { c.v = new byte[1][1][1]; c.v[0] = new byte[0][0]; byte[][] val1 = get2(); ! c.v[0] = new byte[0][0]; byte[][] val2 = get2(); assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2))); } {
*** 478,496 **** public static byte get1() { return get().a; } public static void test() throws Exception { { c.v = new A(); c.v.a = 1; A val1 = get(); ! c.v.a = 2; A val2 = get(); assertEquals(val1.a, 2); assertEquals(val2.a, 2); } { c.v = new A(); c.v.a = 1; byte val1 = get1(); ! c.v.a = 2; byte val2 = get1(); c.v = new A(); c.v.a = 3; byte val3 = get1(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); assertEquals(val3, (isStableEnabled ? 1 : 3)); --- 478,496 ---- public static byte get1() { return get().a; } public static void test() throws Exception { { c.v = new A(); c.v.a = 1; A val1 = get(); ! c.v.a = 2; A val2 = get(); assertEquals(val1.a, 2); assertEquals(val2.a, 2); } { c.v = new A(); c.v.a = 1; byte val1 = get1(); ! c.v.a = 2; byte val2 = get1(); c.v = new A(); c.v.a = 3; byte val3 = get1(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); assertEquals(val3, (isStableEnabled ? 1 : 3));
*** 512,534 **** public static byte get1() { return get().a; } public static void test() throws Exception { { c.v = new A(); c.v.next = new A(); c.v.next.next = c.v; ! c.v.a = 1; c.v.next.a = 1; A val1 = get(); ! c.v.a = 2; c.v.next.a = 2; A val2 = get(); assertEquals(val1.a, 2); assertEquals(val2.a, 2); } { c.v = new A(); c.v.next = c.v; ! c.v.a = 1; byte val1 = get1(); ! c.v.a = 2; byte val2 = get1(); c.v = new A(); c.v.next = c.v; ! c.v.a = 3; byte val3 = get1(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); assertEquals(val3, (isStableEnabled ? 1 : 3)); } --- 512,534 ---- public static byte get1() { return get().a; } public static void test() throws Exception { { c.v = new A(); c.v.next = new A(); c.v.next.next = c.v; ! c.v.a = 1; c.v.next.a = 1; A val1 = get(); ! c.v.a = 2; c.v.next.a = 2; A val2 = get(); assertEquals(val1.a, 2); assertEquals(val2.a, 2); } { c.v = new A(); c.v.next = c.v; ! c.v.a = 1; byte val1 = get1(); ! c.v.a = 2; byte val2 = get1(); c.v = new A(); c.v.next = c.v; ! c.v.a = 3; byte val3 = get1(); assertEquals(val1, 1); assertEquals(val2, (isStableEnabled ? 1 : 2)); assertEquals(val3, (isStableEnabled ? 1 : 3)); }
*** 550,561 **** public static byte get1() { return c.v.left.left.right.left.a; } public static void test() throws Exception { { c.v = new A(); c.v.left = c.v.right = c.v; ! c.v.a = 1; byte val1 = get(); byte val2 = get1(); ! c.v.a = 2; byte val3 = get(); byte val4 = get1(); assertEquals(val1, 1); assertEquals(val3, (isStableEnabled ? 1 : 2)); assertEquals(val2, 1); --- 550,561 ---- public static byte get1() { return c.v.left.left.right.left.a; } public static void test() throws Exception { { c.v = new A(); c.v.left = c.v.right = c.v; ! c.v.a = 1; byte val1 = get(); byte val2 = get1(); ! c.v.a = 2; byte val3 = get(); byte val4 = get1(); assertEquals(val1, 1); assertEquals(val3, (isStableEnabled ? 1 : 2)); assertEquals(val2, 1);
*** 581,592 **** public static void test() throws Exception { { A elem = new A(); c.v = new A[] { elem, elem }; c.v[0].left = c.v[0].right = c.v; ! elem.a = 1; byte val1 = get(); byte val2 = get1(); ! elem.a = 2; byte val3 = get(); byte val4 = get1(); assertEquals(val1, 1); assertEquals(val3, (isStableEnabled ? 1 : 2)); assertEquals(val2, 1); --- 581,592 ---- public static void test() throws Exception { { A elem = new A(); c.v = new A[] { elem, elem }; c.v[0].left = c.v[0].right = c.v; ! elem.a = 1; byte val1 = get(); byte val2 = get1(); ! elem.a = 2; byte val3 = get(); byte val4 = get1(); assertEquals(val1, 1); assertEquals(val3, (isStableEnabled ? 1 : 2)); assertEquals(val2, 1);
< prev index next >