diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t4332.scala | 2 | ||||
-rw-r--r-- | test/files/run/t8907.scala | 39 | ||||
-rw-r--r-- | test/junit/scala/collection/immutable/StreamTest.scala | 18 |
3 files changed, 40 insertions, 19 deletions
diff --git a/test/files/run/t4332.scala b/test/files/run/t4332.scala index 1c7e7d73de..5a67922911 100644 --- a/test/files/run/t4332.scala +++ b/test/files/run/t4332.scala @@ -12,7 +12,7 @@ object Test extends DirectTest { } def isExempt(sym: Symbol) = { - val exempt = Set("view", "repr", "sliceWithKnownDelta", "sliceWithKnownBound", "transform", "filterImpl") + val exempt = Set("view", "repr", "sliceWithKnownDelta", "sliceWithKnownBound", "transform") (exempt contains sym.name.decoded) } diff --git a/test/files/run/t8907.scala b/test/files/run/t8907.scala new file mode 100644 index 0000000000..7952ac82d9 --- /dev/null +++ b/test/files/run/t8907.scala @@ -0,0 +1,39 @@ +import scala.tools.partest._ +import java.io.File + +object Test extends StoreReporterDirectTest { + def code = ??? + + def compileCode(code: String) = { + val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator") + compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(code) + } + + def show(): Unit = { + compileCode(""" + class C { class Inner } + + class D { + object O { + def foo(c: C)(i: c.Inner): c.Inner = ??? + } + } + """) + assert(filteredInfos.isEmpty, filteredInfos) + deleteClass("C") + compileCode(""" + class E { + def foo = { + (null: D).toString + } + } + """) + assert(storeReporter.infos.isEmpty, storeReporter.infos.mkString("\n")) // Included a MissingRequirementError before. + } + + def deleteClass(name: String) { + val classFile = new File(testOutput.path, name + ".class") + assert(classFile.exists) + assert(classFile.delete()) + } +} diff --git a/test/junit/scala/collection/immutable/StreamTest.scala b/test/junit/scala/collection/immutable/StreamTest.scala deleted file mode 100644 index 6dc1c79a48..0000000000 --- a/test/junit/scala/collection/immutable/StreamTest.scala +++ /dev/null @@ -1,18 +0,0 @@ -package scala.collection.immutable - -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 -import org.junit.Test -import org.junit.Assert._ - -@RunWith(classOf[JUnit4]) -class StreamTest { - - @Test - def t6727_and_t6440(): 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)) - } -} |