blob: 2ab682299d83a65e012596a128981f5d90718c61 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package scala.collection
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.Assert._
import org.junit.Test
@RunWith(classOf[JUnit4])
class SeqLikeTest {
@Test def `SI-9936 indexWhere`(): Unit = {
assertEquals(2, "abcde".indexOf('c', -1))
assertEquals(2, "abcde".indexOf('c', -2))
assertEquals(2, "abcde".toVector.indexOf('c', -1))
assertEquals(2, "abcde".toVector.indexOf('c', -2))
assertEquals(2, "abcde".toVector.indexWhere(_ == 'c', -1))
assertEquals(2, "abcde".toVector.indexWhere(_ == 'c', -2))
}
}
|