diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/benchmarks/project/plugins.sbt | 2 | ||||
-rw-r--r-- | test/junit/scala/collection/SeqLikeTest.scala | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/test/benchmarks/project/plugins.sbt b/test/benchmarks/project/plugins.sbt index e11aa29f3b..aa49ad9872 100644 --- a/test/benchmarks/project/plugins.sbt +++ b/test/benchmarks/project/plugins.sbt @@ -1,2 +1,2 @@ addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.6") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.16") diff --git a/test/junit/scala/collection/SeqLikeTest.scala b/test/junit/scala/collection/SeqLikeTest.scala new file mode 100644 index 0000000000..2ab682299d --- /dev/null +++ b/test/junit/scala/collection/SeqLikeTest.scala @@ -0,0 +1,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)) + } +} |