From fe4daa3ed90d65bf1c05a57398d747ae0780b4cb Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 8 Jul 2015 09:44:28 -0400 Subject: [PATCH] add test coverage for SI-8627 (Stream.filterNot) --- test/junit/scala/collection/immutable/StreamTest.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/junit/scala/collection/immutable/StreamTest.scala b/test/junit/scala/collection/immutable/StreamTest.scala index 437cbc89262f..fad4e502eba1 100644 --- a/test/junit/scala/collection/immutable/StreamTest.scala +++ b/test/junit/scala/collection/immutable/StreamTest.scala @@ -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