summaryrefslogtreecommitdiff
path: root/test/junit/scala/collection/IndexedSeqOptimizedTest.scala
blob: e5382907af59673c76375c04691c3396eb8d241e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 IndexedSeqOptimizedTest {

  @Test
  def notThrowsAnExceptionInLastIndexOf() {
    assertEquals(0, (Array(2): collection.mutable.WrappedArray[Int]).lastIndexWhere(_ => true, 1))
    assertEquals(2, "abc123".lastIndexWhere(_.isLetter, 6))
  }
}