Skip to content

Commit 5aae3a7

Browse files
author
thk123
committed
Strengthen and comment on tests
1 parent f775c75 commit 5aae3a7

10 files changed

+33
-0
lines changed
216 Bytes
Binary file not shown.

jbmc/regression/jbmc/array-clone/ArrayClone.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,71 @@ public static void cloneReferenceArray() {
44
ArrayClone[] clone = a.clone();
55

66
assert(a.length == clone.length);
7+
assert(a != clone);
78
}
89

910
public static void cloneObjectArray() {
1011
Object[] a = {new Object(), new Object() };
1112
Object[] clone = a.clone();
1213

1314
assert(a.length == clone.length);
15+
assert(a != clone);
1416
}
1517

1618
public static void cloneByteArray() {
1719
byte[] a = {(byte) 1, (byte) 2};
1820
byte[] clone = a.clone();
1921

2022
assert(a.length == clone.length);
23+
assert(a != clone);
2124
}
2225

2326
public static void cloneShortArray() {
2427
short[] a = {(short) 1, (short) 2};
2528
short[] clone = a.clone();
2629

2730
assert(a.length == clone.length);
31+
assert(a != clone);
2832
}
2933

3034
public static void cloneIntArray() {
3135
int[] a = {1, 2};
3236
int[] clone = a.clone();
3337

3438
assert(a.length == clone.length);
39+
assert(a != clone);
3540
}
3641

3742
public static void cloneLongArray() {
3843
long[] a = {1L, 2L };
3944
long[] clone = a.clone();
4045

4146
assert(a.length == clone.length);
47+
assert(a != clone);
4248
}
4349

4450
public static void cloneFloatArray() {
4551
float[] a = {1.0f, 2.0f};
4652
float[] clone = a.clone();
4753

4854
assert(a.length == clone.length);
55+
assert(a != clone);
4956
}
5057

5158
public static void cloneDoubleArray() {
5259
double[] a = {1.0, 2.0};
5360
double[] clone = a.clone();
5461

5562
assert(a.length == clone.length);
63+
assert(a != clone);
5664
}
5765

5866
public static void cloneBooleanArray() {
5967
boolean[] a = {true, false};
6068
boolean[] clone = a.clone();
6169

6270
assert(a.length == clone.length);
71+
assert(a != clone);
6372
}
6473

6574
}

jbmc/regression/jbmc/array-clone/testByte.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ ArrayClone.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Verify that clone works correctly for byte arrays

jbmc/regression/jbmc/array-clone/testDouble.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ ArrayClone.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Verify that clone works correctly for double arrays

jbmc/regression/jbmc/array-clone/testFloat.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ ArrayClone.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Verify that clone works correctly for float arrays

jbmc/regression/jbmc/array-clone/testInt.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ ArrayClone.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Verify that clone works correctly for int arrays

jbmc/regression/jbmc/array-clone/testLong.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ ArrayClone.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Verify that clone works correctly for long arrays

jbmc/regression/jbmc/array-clone/testObject.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ ArrayClone.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Verify that clone works correctly for arrays of objects

jbmc/regression/jbmc/array-clone/testReference.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ ArrayClone.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Verify that clone works correctly for reference (non-object) arrays

jbmc/regression/jbmc/array-clone/testShort.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ ArrayClone.class
44
^EXIT=0$
55
^SIGNAL=0$
66
^VERIFICATION SUCCESSFUL$
7+
--
8+
--
9+
Verify that clone works correctly for short arrays

0 commit comments

Comments
 (0)