Update range iteration tests and regenerate test data.
This commit is contained in:
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 5 downTo 10: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 5.toByte() downTo 10.toByte()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>()) {
|
||||
if (list2 != listOf<Int>()) {
|
||||
return "Wrong elements for 5.toByte() downTo 10.toByte(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 5.toShort() downTo 10.toShort()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>()) {
|
||||
if (list3 != listOf<Int>()) {
|
||||
return "Wrong elements for 5.toShort() downTo 10.toShort(): $list3"
|
||||
}
|
||||
|
||||
|
||||
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 10..5: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 10.toByte()..(-5).toByte()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>()) {
|
||||
if (list2 != listOf<Int>()) {
|
||||
return "Wrong elements for 10.toByte()..(-5).toByte(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 10.toShort()..(-5).toShort()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>()) {
|
||||
if (list3 != listOf<Int>()) {
|
||||
return "Wrong elements for 10.toShort()..(-5).toShort(): $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for (MinI + 5) downTo MinI step 3: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (MinB + 5).toByte() downTo MinB step 3
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>((MinB + 5).toByte(), (MinB + 2).toByte())) {
|
||||
if (list2 != listOf<Int>((MinB + 5).toInt(), (MinB + 2).toInt())) {
|
||||
return "Wrong elements for (MinB + 5).toByte() downTo MinB step 3: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (MinS + 5).toShort() downTo MinS step 3
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>((MinS + 5).toShort(), (MinS + 2).toShort())) {
|
||||
if (list3 != listOf<Int>((MinS + 5).toInt(), (MinS + 2).toInt())) {
|
||||
return "Wrong elements for (MinS + 5).toShort() downTo MinS step 3: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 8 downTo 3 step 2: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 8.toByte() downTo 3.toByte() step 2
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(8, 6, 4)) {
|
||||
if (list2 != listOf<Int>(8, 6, 4)) {
|
||||
return "Wrong elements for 8.toByte() downTo 3.toByte() step 2: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 8.toShort() downTo 3.toShort() step 2
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(8, 6, 4)) {
|
||||
if (list3 != listOf<Int>(8, 6, 4)) {
|
||||
return "Wrong elements for 8.toShort() downTo 3.toShort() step 2: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 3..8 step 2: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 3.toByte()..8.toByte() step 2
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(3, 5, 7)) {
|
||||
if (list2 != listOf<Int>(3, 5, 7)) {
|
||||
return "Wrong elements for 3.toByte()..8.toByte() step 2: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 3.toShort()..8.toShort() step 2
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(3, 5, 7)) {
|
||||
if (list3 != listOf<Int>(3, 5, 7)) {
|
||||
return "Wrong elements for 3.toShort()..8.toShort() step 2: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for (MaxI - 5)..MaxI step 3: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (MaxB - 5).toByte()..MaxB step 3
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>((MaxB - 5).toByte(), (MaxB - 2).toByte())) {
|
||||
if (list2 != listOf<Int>((MaxB - 5).toInt(), (MaxB - 2).toInt())) {
|
||||
return "Wrong elements for (MaxB - 5).toByte()..MaxB step 3: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (MaxS - 5).toShort()..MaxS step 3
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>((MaxS - 5).toShort(), (MaxS - 2).toShort())) {
|
||||
if (list3 != listOf<Int>((MaxS - 5).toInt(), (MaxS - 2).toInt())) {
|
||||
return "Wrong elements for (MaxS - 5).toShort()..MaxS step 3: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for (MaxI - 2)..MaxI: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (MaxB - 2).toByte()..MaxB
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>((MaxB - 2).toByte(), (MaxB - 1).toByte(), MaxB)) {
|
||||
if (list2 != listOf<Int>((MaxB - 2).toInt(), (MaxB - 1).toInt(), MaxB.toInt())) {
|
||||
return "Wrong elements for (MaxB - 2).toByte()..MaxB: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (MaxS - 2).toShort()..MaxS
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>((MaxS - 2).toShort(), (MaxS - 1).toShort(), MaxS)) {
|
||||
if (list3 != listOf<Int>((MaxS - 2).toInt(), (MaxS - 1).toInt(), MaxS.toInt())) {
|
||||
return "Wrong elements for (MaxS - 2).toShort()..MaxS: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for MaxI..MaxI: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = MaxB..MaxB
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(MaxB)) {
|
||||
if (list2 != listOf<Int>(MaxB.toInt())) {
|
||||
return "Wrong elements for MaxB..MaxB: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = MaxS..MaxS
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(MaxS)) {
|
||||
if (list3 != listOf<Int>(MaxS.toInt())) {
|
||||
return "Wrong elements for MaxS..MaxS: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for MaxI..MinI: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = MaxB..MinB
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>()) {
|
||||
if (list2 != listOf<Int>()) {
|
||||
return "Wrong elements for MaxB..MinB: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = MaxS..MinS
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>()) {
|
||||
if (list3 != listOf<Int>()) {
|
||||
return "Wrong elements for MaxS..MinS: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 5 downTo 5: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 5.toByte() downTo 5.toByte()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(5.toByte())) {
|
||||
if (list2 != listOf<Int>(5)) {
|
||||
return "Wrong elements for 5.toByte() downTo 5.toByte(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 5.toShort() downTo 5.toShort()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(5.toShort())) {
|
||||
if (list3 != listOf<Int>(5)) {
|
||||
return "Wrong elements for 5.toShort() downTo 5.toShort(): $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 5..5: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 5.toByte()..5.toByte()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(5.toByte())) {
|
||||
if (list2 != listOf<Int>(5)) {
|
||||
return "Wrong elements for 5.toByte()..5.toByte(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 5.toShort()..5.toShort()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(5.toShort())) {
|
||||
if (list3 != listOf<Int>(5)) {
|
||||
return "Wrong elements for 5.toShort()..5.toShort(): $list3"
|
||||
}
|
||||
|
||||
|
||||
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 1 until 5: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 1.toByte() until 5.toByte()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(1, 2, 3, 4)) {
|
||||
if (list2 != listOf<Int>(1, 2, 3, 4)) {
|
||||
return "Wrong elements for 1.toByte() until 5.toByte(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 1.toShort() until 5.toShort()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(1, 2, 3, 4)) {
|
||||
if (list3 != listOf<Int>(1, 2, 3, 4)) {
|
||||
return "Wrong elements for 1.toShort() until 5.toShort(): $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for (MinI + 2) downTo MinI step 1: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (MinB + 2).toByte() downTo MinB step 1
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>((MinB + 2).toByte(), (MinB + 1).toByte(), MinB)) {
|
||||
if (list2 != listOf<Int>((MinB + 2).toInt(), (MinB + 1).toInt(), MinB.toInt())) {
|
||||
return "Wrong elements for (MinB + 2).toByte() downTo MinB step 1: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (MinS + 2).toShort() downTo MinS step 1
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>((MinS + 2).toShort(), (MinS + 1).toShort(), MinS)) {
|
||||
if (list3 != listOf<Int>((MinS + 2).toInt(), (MinS + 1).toInt(), MinS.toInt())) {
|
||||
return "Wrong elements for (MinS + 2).toShort() downTo MinS step 1: $list3"
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for (MaxI - 2)..MaxI step 2: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (MaxB - 2).toByte()..MaxB step 2
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>((MaxB - 2).toByte(), MaxB)) {
|
||||
if (list2 != listOf<Int>((MaxB - 2).toInt(), MaxB.toInt())) {
|
||||
return "Wrong elements for (MaxB - 2).toByte()..MaxB step 2: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (MaxS - 2).toShort()..MaxS step 2
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>((MaxS - 2).toShort(), MaxS)) {
|
||||
if (list3 != listOf<Int>((MaxS - 2).toInt(), MaxS.toInt())) {
|
||||
return "Wrong elements for (MaxS - 2).toShort()..MaxS step 2: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for MaxI..MaxI step 1: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = MaxB..MaxB step 1
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(MaxB)) {
|
||||
if (list2 != listOf<Int>(MaxB.toInt())) {
|
||||
return "Wrong elements for MaxB..MaxB step 1: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = MaxS..MaxS step 1
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(MaxS)) {
|
||||
if (list3 != listOf<Int>(MaxS.toInt())) {
|
||||
return "Wrong elements for MaxS..MaxS step 1: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for MaxI..MinI step 1: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = MaxB..MinB step 1
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>()) {
|
||||
if (list2 != listOf<Int>()) {
|
||||
return "Wrong elements for MaxB..MinB step 1: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = MaxS..MinS step 1
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>()) {
|
||||
if (list3 != listOf<Int>()) {
|
||||
return "Wrong elements for MaxS..MinS step 1: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -23,23 +23,23 @@ fun box(): String {
|
||||
return "Wrong elements for MinI..MinI step 1: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = MinB..MinB step 1
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(MinB)) {
|
||||
if (list2 != listOf<Int>(MinB.toInt())) {
|
||||
return "Wrong elements for MinB..MinB step 1: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = MinS..MinS step 1
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(MinS)) {
|
||||
if (list3 != listOf<Int>(MinS.toInt())) {
|
||||
return "Wrong elements for MinS..MinS step 1: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for (5 downTo 3).reversed(): $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (5.toByte() downTo 3.toByte()).reversed()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(3, 4, 5)) {
|
||||
if (list2 != listOf<Int>(3, 4, 5)) {
|
||||
return "Wrong elements for (5.toByte() downTo 3.toByte()).reversed(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (5.toShort() downTo 3.toShort()).reversed()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(3, 4, 5)) {
|
||||
if (list3 != listOf<Int>(3, 4, 5)) {
|
||||
return "Wrong elements for (5.toShort() downTo 3.toShort()).reversed(): $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for (3 downTo 5).reversed(): $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (3.toByte() downTo 5.toByte()).reversed()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>()) {
|
||||
if (list2 != listOf<Int>()) {
|
||||
return "Wrong elements for (3.toByte() downTo 5.toByte()).reversed(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (3.toShort() downTo 5.toShort()).reversed()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>()) {
|
||||
if (list3 != listOf<Int>()) {
|
||||
return "Wrong elements for (3.toShort() downTo 5.toShort()).reversed(): $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for (5..3).reversed(): $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (5.toByte()..3.toByte()).reversed()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>()) {
|
||||
if (list2 != listOf<Int>()) {
|
||||
return "Wrong elements for (5.toByte()..3.toByte()).reversed(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (5.toShort()..3.toShort()).reversed()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>()) {
|
||||
if (list3 != listOf<Int>()) {
|
||||
return "Wrong elements for (5.toShort()..3.toShort()).reversed(): $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for (8 downTo 3 step 2).reversed(): $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (8.toByte() downTo 3.toByte() step 2).reversed()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(3, 5, 7)) {
|
||||
if (list2 != listOf<Int>(3, 5, 7)) {
|
||||
return "Wrong elements for (8.toByte() downTo 3.toByte() step 2).reversed(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (8.toShort() downTo 3.toShort() step 2).reversed()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(3, 5, 7)) {
|
||||
if (list3 != listOf<Int>(3, 5, 7)) {
|
||||
return "Wrong elements for (8.toShort() downTo 3.toShort() step 2).reversed(): $list3"
|
||||
}
|
||||
|
||||
|
||||
+20
-30
@@ -12,64 +12,54 @@ fun box(): String {
|
||||
return "Wrong elements for (3..5).reversed(): $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val range2 = (3.toByte()..5.toByte()).reversed()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (3.toShort()..5.toShort()).reversed()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(5, 4, 3)) {
|
||||
return "Wrong elements for (3.toByte()..5.toByte()).reversed(): $list2"
|
||||
if (list2 != listOf<Int>(5, 4, 3)) {
|
||||
return "Wrong elements for (3.toShort()..5.toShort()).reversed(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val range3 = (3.toShort()..5.toShort()).reversed()
|
||||
val list3 = ArrayList<Long>()
|
||||
val range3 = (3.toLong()..5.toLong()).reversed()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(5, 4, 3)) {
|
||||
return "Wrong elements for (3.toShort()..5.toShort()).reversed(): $list3"
|
||||
if (list3 != listOf<Long>(5, 4, 3)) {
|
||||
return "Wrong elements for (3.toLong()..5.toLong()).reversed(): $list3"
|
||||
}
|
||||
|
||||
val list4 = ArrayList<Long>()
|
||||
val range4 = (3.toLong()..5.toLong()).reversed()
|
||||
val list4 = ArrayList<Char>()
|
||||
val range4 = ('a'..'c').reversed()
|
||||
for (i in range4) {
|
||||
list4.add(i)
|
||||
if (list4.size() > 23) break
|
||||
}
|
||||
if (list4 != listOf<Long>(5, 4, 3)) {
|
||||
return "Wrong elements for (3.toLong()..5.toLong()).reversed(): $list4"
|
||||
if (list4 != listOf<Char>('c', 'b', 'a')) {
|
||||
return "Wrong elements for ('a'..'c').reversed(): $list4"
|
||||
}
|
||||
|
||||
val list5 = ArrayList<Char>()
|
||||
val range5 = ('a'..'c').reversed()
|
||||
val list5 = ArrayList<Double>()
|
||||
val range5 = (3.0..5.0).reversed()
|
||||
for (i in range5) {
|
||||
list5.add(i)
|
||||
if (list5.size() > 23) break
|
||||
}
|
||||
if (list5 != listOf<Char>('c', 'b', 'a')) {
|
||||
return "Wrong elements for ('a'..'c').reversed(): $list5"
|
||||
if (list5 != listOf<Double>(5.0, 4.0, 3.0)) {
|
||||
return "Wrong elements for (3.0..5.0).reversed(): $list5"
|
||||
}
|
||||
|
||||
val list6 = ArrayList<Double>()
|
||||
val range6 = (3.0..5.0).reversed()
|
||||
val list6 = ArrayList<Float>()
|
||||
val range6 = (3.0.toFloat()..5.0.toFloat()).reversed()
|
||||
for (i in range6) {
|
||||
list6.add(i)
|
||||
if (list6.size() > 23) break
|
||||
}
|
||||
if (list6 != listOf<Double>(5.0, 4.0, 3.0)) {
|
||||
return "Wrong elements for (3.0..5.0).reversed(): $list6"
|
||||
}
|
||||
|
||||
val list7 = ArrayList<Float>()
|
||||
val range7 = (3.0.toFloat()..5.0.toFloat()).reversed()
|
||||
for (i in range7) {
|
||||
list7.add(i)
|
||||
if (list7.size() > 23) break
|
||||
}
|
||||
if (list7 != listOf<Float>(5.0.toFloat(), 4.0.toFloat(), 3.0.toFloat())) {
|
||||
return "Wrong elements for (3.0.toFloat()..5.0.toFloat()).reversed(): $list7"
|
||||
if (list6 != listOf<Float>(5.0.toFloat(), 4.0.toFloat(), 3.0.toFloat())) {
|
||||
return "Wrong elements for (3.0.toFloat()..5.0.toFloat()).reversed(): $list6"
|
||||
}
|
||||
|
||||
return "OK"
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for (3..9 step 2).reversed(): $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (3.toByte()..9.toByte() step 2).reversed()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(9, 7, 5, 3)) {
|
||||
if (list2 != listOf<Int>(9, 7, 5, 3)) {
|
||||
return "Wrong elements for (3.toByte()..9.toByte() step 2).reversed(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (3.toShort()..9.toShort() step 2).reversed()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(9, 7, 5, 3)) {
|
||||
if (list3 != listOf<Int>(9, 7, 5, 3)) {
|
||||
return "Wrong elements for (3.toShort()..9.toShort() step 2).reversed(): $list3"
|
||||
}
|
||||
|
||||
|
||||
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 9 downTo 3: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 9.toByte() downTo 3.toByte()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(9, 8, 7, 6, 5, 4, 3)) {
|
||||
if (list2 != listOf<Int>(9, 8, 7, 6, 5, 4, 3)) {
|
||||
return "Wrong elements for 9.toByte() downTo 3.toByte(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 9.toShort() downTo 3.toShort()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(9, 8, 7, 6, 5, 4, 3)) {
|
||||
if (list3 != listOf<Int>(9, 8, 7, 6, 5, 4, 3)) {
|
||||
return "Wrong elements for 9.toShort() downTo 3.toShort(): $list3"
|
||||
}
|
||||
|
||||
|
||||
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 3..9: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 3.toByte()..9.toByte()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(3, 4, 5, 6, 7, 8, 9)) {
|
||||
if (list2 != listOf<Int>(3, 4, 5, 6, 7, 8, 9)) {
|
||||
return "Wrong elements for 3.toByte()..9.toByte(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 3.toShort()..9.toShort()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(3, 4, 5, 6, 7, 8, 9)) {
|
||||
if (list3 != listOf<Int>(3, 4, 5, 6, 7, 8, 9)) {
|
||||
return "Wrong elements for 3.toShort()..9.toShort(): $list3"
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for (1 + 2)..(10 - 1): $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = (1.toByte() + 2.toByte()).toByte()..(10.toByte() - 1.toByte()).toByte()
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(3, 4, 5, 6, 7, 8, 9)) {
|
||||
if (list2 != listOf<Int>(3, 4, 5, 6, 7, 8, 9)) {
|
||||
return "Wrong elements for (1.toByte() + 2.toByte()).toByte()..(10.toByte() - 1.toByte()).toByte(): $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = (1.toShort() + 2.toShort()).toShort()..(10.toShort() - 1.toShort()).toShort()
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(3, 4, 5, 6, 7, 8, 9)) {
|
||||
if (list3 != listOf<Int>(3, 4, 5, 6, 7, 8, 9)) {
|
||||
return "Wrong elements for (1.toShort() + 2.toShort()).toShort()..(10.toShort() - 1.toShort()).toShort(): $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 9 downTo 3 step 2: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 9.toByte() downTo 3.toByte() step 2
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(9, 7, 5, 3)) {
|
||||
if (list2 != listOf<Int>(9, 7, 5, 3)) {
|
||||
return "Wrong elements for 9.toByte() downTo 3.toByte() step 2: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 9.toShort() downTo 3.toShort() step 2
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(9, 7, 5, 3)) {
|
||||
if (list3 != listOf<Int>(9, 7, 5, 3)) {
|
||||
return "Wrong elements for 9.toShort() downTo 3.toShort() step 2: $list3"
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -12,23 +12,23 @@ fun box(): String {
|
||||
return "Wrong elements for 3..9 step 2: $list1"
|
||||
}
|
||||
|
||||
val list2 = ArrayList<Byte>()
|
||||
val list2 = ArrayList<Int>()
|
||||
val range2 = 3.toByte()..9.toByte() step 2
|
||||
for (i in range2) {
|
||||
list2.add(i)
|
||||
if (list2.size() > 23) break
|
||||
}
|
||||
if (list2 != listOf<Byte>(3, 5, 7, 9)) {
|
||||
if (list2 != listOf<Int>(3, 5, 7, 9)) {
|
||||
return "Wrong elements for 3.toByte()..9.toByte() step 2: $list2"
|
||||
}
|
||||
|
||||
val list3 = ArrayList<Short>()
|
||||
val list3 = ArrayList<Int>()
|
||||
val range3 = 3.toShort()..9.toShort() step 2
|
||||
for (i in range3) {
|
||||
list3.add(i)
|
||||
if (list3.size() > 23) break
|
||||
}
|
||||
if (list3 != listOf<Short>(3, 5, 7, 9)) {
|
||||
if (list3 != listOf<Int>(3, 5, 7, 9)) {
|
||||
return "Wrong elements for 3.toShort()..9.toShort() step 2: $list3"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user