< prev index next >
test/compiler/stable/TestStableShort.java
Print this page
rev 11353 : 8149043: Fix code indentation in test/compiler/stable tests
Reviewed-by:
@@ -98,11 +98,11 @@
public @Stable short v;
public static final DefaultValue c = new DefaultValue();
public static short get() { return c.v; }
public static void test() throws Exception {
- short val1 = get();
+ short val1 = get();
c.v = 1; short val2 = get();
assertEquals(val1, 0);
assertEquals(val2, 1);
}
}
@@ -128,11 +128,11 @@
public static @Stable short v;
public static final DefaultStaticValue c = new DefaultStaticValue();
public static short get() { return c.v; }
public static void test() throws Exception {
- short val1 = get();
+ short val1 = get();
c.v = 1; short val2 = get();
assertEquals(val1, 0);
assertEquals(val2, 1);
}
}
@@ -178,28 +178,28 @@
public static short get1() { return c.v[10]; }
public static short[] get2() { return c.v; }
public static void test() throws Exception {
{
c.v = new short[1]; c.v[0] = 1; short val1 = get();
- c.v[0] = 2; short val2 = get();
+ c.v[0] = 2; short val2 = get();
assertEquals(val1, 1);
assertEquals(val2, (isStableEnabled ? 1 : 2));
c.v = new short[1]; c.v[0] = 3; short val3 = get();
assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 3));
+ : 3));
}
{
c.v = new short[20]; c.v[10] = 1; short val1 = get1();
- c.v[10] = 2; short val2 = get1();
+ c.v[10] = 2; short val2 = get1();
assertEquals(val1, 1);
assertEquals(val2, (isStableEnabled ? 1 : 2));
c.v = new short[20]; c.v[10] = 3; short val3 = get1();
assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 3));
+ : 3));
}
{
c.v = new short[1]; short[] val1 = get2();
c.v = new short[1]; short[] val2 = get2();
@@ -218,21 +218,21 @@
public static short[] get1() { return c.v[0]; }
public static short[][] get2() { return c.v; }
public static void test() throws Exception {
{
c.v = new short[1][1]; c.v[0][0] = 1; short val1 = get();
- c.v[0][0] = 2; short val2 = get();
+ c.v[0][0] = 2; short val2 = get();
assertEquals(val1, 1);
assertEquals(val2, (isStableEnabled ? 1 : 2));
c.v = new short[1][1]; c.v[0][0] = 3; short val3 = get();
assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 3));
+ : 3));
c.v[0] = new short[1]; c.v[0][0] = 4; short val4 = get();
assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 4));
+ : 4));
}
{
c.v = new short[1][1]; short[] val1 = get1();
c.v[0] = new short[1]; short[] val2 = get1();
@@ -258,25 +258,25 @@
public static short[][] get2() { return c.v[0]; }
public static short[][][] get3() { return c.v; }
public static void test() throws Exception {
{
c.v = new short[1][1][1]; c.v[0][0][0] = 1; short val1 = get();
- c.v[0][0][0] = 2; short val2 = get();
+ c.v[0][0][0] = 2; short val2 = get();
assertEquals(val1, 1);
assertEquals(val2, (isStableEnabled ? 1 : 2));
c.v = new short[1][1][1]; c.v[0][0][0] = 3; short val3 = get();
assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 3));
+ : 3));
c.v[0] = new short[1][1]; c.v[0][0][0] = 4; short val4 = get();
assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 4));
+ : 4));
c.v[0][0] = new short[1]; c.v[0][0][0] = 5; short val5 = get();
assertEquals(val5, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 5));
+ : 5));
}
{
c.v = new short[1][1][1]; short[] val1 = get1();
c.v[0][0] = new short[1]; short[] val2 = get1();
@@ -309,29 +309,29 @@
public static short[][][] get3() { return c.v[0]; }
public static short[][][][] get4() { return c.v; }
public static void test() throws Exception {
{
c.v = new short[1][1][1][1]; c.v[0][0][0][0] = 1; short val1 = get();
- c.v[0][0][0][0] = 2; short val2 = get();
+ c.v[0][0][0][0] = 2; short val2 = get();
assertEquals(val1, 1);
assertEquals(val2, (isStableEnabled ? 1 : 2));
c.v = new short[1][1][1][1]; c.v[0][0][0][0] = 3; short val3 = get();
assertEquals(val3, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 3));
+ : 3));
c.v[0] = new short[1][1][1]; c.v[0][0][0][0] = 4; short val4 = get();
assertEquals(val4, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 4));
+ : 4));
c.v[0][0] = new short[1][1]; c.v[0][0][0][0] = 5; short val5 = get();
assertEquals(val5, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 5));
+ : 5));
c.v[0][0][0] = new short[1]; c.v[0][0][0][0] = 6; short val6 = get();
assertEquals(val6, (isStableEnabled ? (isStableEnabled ? 1 : 2)
- : 6));
+ : 6));
}
{
c.v = new short[1][1][1][1]; short[] val1 = get1();
c.v[0][0][0] = new short[1]; short[] val2 = get1();
@@ -368,11 +368,11 @@
public static short[] get1() { return (short[])c.v; }
public static void test() throws Exception {
{
c.v = new short[1]; ((short[])c.v)[0] = 1; short val1 = get();
- ((short[])c.v)[0] = 2; short val2 = get();
+ ((short[])c.v)[0] = 2; short val2 = get();
assertEquals(val1, 1);
assertEquals(val2, 2);
}
@@ -395,19 +395,19 @@
public static Object[] get2() { return c.v; }
public static void test() throws Exception {
{
c.v = new short[1][1]; ((short[][])c.v)[0][0] = 1; short val1 = get();
- ((short[][])c.v)[0][0] = 2; short val2 = get();
+ ((short[][])c.v)[0][0] = 2; short val2 = get();
assertEquals(val1, 1);
assertEquals(val2, 2);
}
{
c.v = new short[1][1]; c.v[0] = new short[0]; short[] val1 = get1();
- c.v[0] = new short[0]; short[] val2 = get1();
+ c.v[0] = new short[0]; short[] val2 = get1();
assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
}
{
@@ -431,26 +431,26 @@
public static Object[][] get3() { return c.v; }
public static void test() throws Exception {
{
c.v = new short[1][1][1]; ((short[][][])c.v)[0][0][0] = 1; short val1 = get();
- ((short[][][])c.v)[0][0][0] = 2; short val2 = get();
+ ((short[][][])c.v)[0][0][0] = 2; short val2 = get();
assertEquals(val1, 1);
assertEquals(val2, 2);
}
{
c.v = new short[1][1][1]; c.v[0][0] = new short[0]; short[] val1 = get1();
- c.v[0][0] = new short[0]; short[] val2 = get1();
+ c.v[0][0] = new short[0]; short[] val2 = get1();
assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
}
{
c.v = new short[1][1][1]; c.v[0] = new short[0][0]; short[][] val1 = get2();
- c.v[0] = new short[0][0]; short[][] val2 = get2();
+ c.v[0] = new short[0][0]; short[][] val2 = get2();
assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
}
{
@@ -476,19 +476,19 @@
public static short 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();
+ c.v.a = 2; A val2 = get();
assertEquals(val1.a, 2);
assertEquals(val2.a, 2);
}
{
c.v = new A(); c.v.a = 1; short val1 = get1();
- c.v.a = 2; short val2 = get1();
+ c.v.a = 2; short val2 = get1();
c.v = new A(); c.v.a = 3; short val3 = get1();
assertEquals(val1, 1);
assertEquals(val2, (isStableEnabled ? 1 : 2));
assertEquals(val3, (isStableEnabled ? 1 : 3));
@@ -510,23 +510,23 @@
public static short 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();
+ 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; short val1 = get1();
- c.v.a = 2; short val2 = get1();
+ c.v.a = 1; short val1 = get1();
+ c.v.a = 2; short val2 = get1();
c.v = new A(); c.v.next = c.v;
- c.v.a = 3; short val3 = get1();
+ c.v.a = 3; short val3 = get1();
assertEquals(val1, 1);
assertEquals(val2, (isStableEnabled ? 1 : 2));
assertEquals(val3, (isStableEnabled ? 1 : 3));
}
@@ -548,12 +548,12 @@
public static short 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; short val1 = get(); short val2 = get1();
- c.v.a = 2; short val3 = get(); short val4 = get1();
+ c.v.a = 1; short val1 = get(); short val2 = get1();
+ c.v.a = 2; short val3 = get(); short val4 = get1();
assertEquals(val1, 1);
assertEquals(val3, (isStableEnabled ? 1 : 2));
assertEquals(val2, 1);
@@ -579,12 +579,12 @@
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; short val1 = get(); short val2 = get1();
- elem.a = 2; short val3 = get(); short val4 = get1();
+ elem.a = 1; short val1 = get(); short val2 = get1();
+ elem.a = 2; short val3 = get(); short val4 = get1();
assertEquals(val1, 1);
assertEquals(val3, (isStableEnabled ? 1 : 2));
assertEquals(val2, 1);
< prev index next >