@@ -8,7 +8,7 @@ object Test extends App {
8
8
try {
9
9
lb0.remove(5 , 0 )
10
10
} catch {
11
- // Not thrown in 2.10, will be thrown in 2.11
11
+ // Should not be thrown--nothing is deleted so nothing to do
12
12
case ex : IndexOutOfBoundsException => println(ex)
13
13
}
14
14
checkNotCorrupted(lb0)
@@ -17,8 +17,8 @@ object Test extends App {
17
17
println(" Trying lb1 ..." )
18
18
try {
19
19
lb1.remove(6 , 6 )
20
- } catch {
21
- // Not thrown in 2.10, will be thrown in 2.11
20
+ } catch {
21
+ // Not thrown in 2.11, is thrown in 2.12
22
22
case ex : IndexOutOfBoundsException => println(ex)
23
23
}
24
24
checkNotCorrupted(lb1)
@@ -28,7 +28,7 @@ object Test extends App {
28
28
try {
29
29
lb2.remove(99 , 6 )
30
30
} catch {
31
- // Not thrown in 2.10, will be thrown in 2.11
31
+ // Not thrown in 2.11, is thrown in 2.12
32
32
case ex : IndexOutOfBoundsException => println(ex)
33
33
}
34
34
checkNotCorrupted(lb2)
@@ -38,26 +38,27 @@ object Test extends App {
38
38
try {
39
39
lb3.remove(1 , 9 )
40
40
} catch {
41
- // Not thrown in 2.10, will be thrown in 2.11
42
- case ex : IllegalArgumentException => println(ex)
41
+ // Not thrown in 2.11, is thrown in 2.12
42
+ case ex : IndexOutOfBoundsException => println(ex)
43
43
}
44
- checkNotCorrupted(lb3, " ListBuffer('a) " , 1 )
44
+ checkNotCorrupted(lb3)
45
45
46
46
val lb4 = newLB
47
47
println(" Trying lb4 ..." )
48
48
try {
49
49
lb4.remove(- 1 , 1 )
50
50
} catch {
51
- // Not thrown in 2.10, will be thrown in 2.11
51
+ // Not thrown in 2.11, is thrown in 2.12
52
52
case ex : IndexOutOfBoundsException => println(ex)
53
53
}
54
- checkNotCorrupted(lb4, " ListBuffer('b, 'c, 'd, 'e) " , 4 )
54
+ checkNotCorrupted(lb4)
55
55
56
56
val lb5 = newLB
57
57
println(" Trying lb5 ..." )
58
58
try {
59
59
lb5.remove(1 , - 1 )
60
60
} catch {
61
+ // Was thrown prior to 2.12 also
61
62
case ex : IllegalArgumentException => println(ex)
62
63
}
63
64
checkNotCorrupted(lb5)
@@ -77,4 +78,4 @@ object Test extends App {
77
78
else println(" !!! length FAILED: " + len)
78
79
println()
79
80
}
80
- }
81
+ }
0 commit comments