blob: ab09c4930bb4bfd96c9c00ad930d31f285b3be46 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package scala.collection
import org.junit.Assert._
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import language.postfixOps
@RunWith(classOf[JUnit4])
class IterableViewLikeTest {
@Test
def hasCorrectDropAndTakeMethods() {
val iter = Iterable(1, 2, 3)
assertEquals(Iterable.empty[Int], iter.view take Int.MinValue force)
assertEquals(Iterable.empty[Int], iter.view takeRight Int.MinValue force)
assertEquals(iter, iter.view drop Int.MinValue force)
assertEquals(iter, iter.view dropRight Int.MinValue force)
}
}
|