File tree Expand file tree Collapse file tree 2 files changed +15
-48
lines changed Expand file tree Collapse file tree 2 files changed +15
-48
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,21 @@ import org.junit.Test
5
5
import org .junit .Assert ._
6
6
7
7
class TestWhitelistedCollections extends DottyTest {
8
+ val files : List [String ] = {
9
+ val whitelist = " ./test/dotc/scala-collections.whitelist"
10
+
11
+ scala.io.Source .fromFile(whitelist, " UTF8" )
12
+ .getLines()
13
+ .map(_.trim) // allow identation
14
+ .filter(! _.startsWith(" #" )) // allow comment lines prefixed by #
15
+ .map(_.takeWhile(_ != '#' ).trim) // allow comments in the end of line
16
+ .filter(_.nonEmpty)
17
+ .filterNot(_.endsWith(" package.scala" ))
18
+ .toList
19
+ }
20
+
8
21
@ Test def arrayHasDocumentation =
9
- checkFiles(WhitelistedStandardLib . files) { doc =>
22
+ checkFiles(files) { doc =>
10
23
val array = doc
11
24
.packages(" scala" )
12
25
.children.find(_.path.mkString(" ." ) == " scala.Array" )
@@ -16,7 +29,7 @@ class TestWhitelistedCollections extends DottyTest {
16
29
}
17
30
18
31
@ Test def traitImmutableHasDocumentation =
19
- checkFiles(WhitelistedStandardLib . files) { doc =>
32
+ checkFiles(files) { doc =>
20
33
val imm = doc
21
34
.packages(" scala" )
22
35
.children.find(_.path.mkString(" ." ) == " scala.Immutable" )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments