Adjust various testData to remove/charAt transformation

This commit is contained in:
Denis Zharkov
2015-10-11 12:40:39 +03:00
parent 6d864e0854
commit a76a8fcc3f
20 changed files with 30 additions and 30 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ fun box(): Boolean {
// test addAt
list.add(0, 400)
list.remove(0);
list.removeAt(0);
list.add(1, 500)
// test contains, addAll
if (!list.contains(500) || list.contains(600) || list.addAll(ArrayList<Int>())) {
+2 -2
View File
@@ -8,7 +8,7 @@ fun box(): Boolean {
arr.add(i)
}
val removedElement = arr.remove(2)
val removed = arr.remove(4: Any)
val removedElement = arr.removeAt(2)
val removed = arr.remove(4)
return arr.size() == 4 && removedElement == 2 && removed && arr[0] == 0 && arr[1] == 1 && arr[2] == 3 && arr[3] == 5
}
@@ -7,7 +7,7 @@ fun box(): Boolean {
val arr = ArrayList<Int>()
try {
arr.remove(2)
arr.removeAt(2)
}
catch(e: IndexOutOfBoundsException) {
threwForEmptyList = true
@@ -20,7 +20,7 @@ fun box(): Boolean {
var threwForFilled = false
try {
arr.remove(20)
arr.removeAt(20)
}
catch(e: IndexOutOfBoundsException) {
threwForFilled = true