Skip to content

Commit

Permalink
add test coverage for SI-8627 (Stream.filterNot)
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed Jul 8, 2015
1 parent b92c3af commit fe4daa3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/junit/scala/collection/immutable/StreamTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ import scala.util.Try
class StreamTest {

@Test
def t6727_and_t6440(): Unit = {
def t6727_and_t6440_and_8627(): Unit = {
assertTrue(Stream.continually(()).filter(_ => true).take(2) == Seq((), ()))
assertTrue(Stream.continually(()).filterNot(_ => false).take(2) == Seq((), ()))
assertTrue(Stream(1,2,3,4,5).filter(_ < 4) == Seq(1,2,3))
assertTrue(Stream(1,2,3,4,5).filterNot(_ > 4) == Seq(1,2,3,4))
assertTrue(Stream.from(1).filter(_ > 4).take(3) == Seq(5,6,7))
assertTrue(Stream.from(1).filterNot(_ <= 4).take(3) == Seq(5,6,7))
}

/** Test helper to verify that the given Stream operation allows
Expand Down

0 comments on commit fe4daa3

Please sign in to comment.