blob: 88dc67e995e71b522c416a32fe7efb6895b01ff3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package dotty.tools
package dottydoc
import org.junit.Test
import org.junit.Assert._
class TestWhitelistedCollections extends DottyTest {
@Test def arrayHasDocumentation =
checkFiles(WhitelistedStandardLib.files) { doc =>
val array = doc
.packages("scala")
.children.find(_.path.mkString(".") == "scala.Array")
.get
assert(array.comment.get.body.length > 0)
}
@Test def traitImmutableHasDocumentation =
checkFiles(WhitelistedStandardLib.files) { doc =>
val imm = doc
.packages("scala")
.children.find(_.path.mkString(".") == "scala.Immutable")
.get
assert(
imm.kind == "trait" && imm.name == "Immutable",
"Found wrong `Immutable`")
assert(
imm.comment.map(_.body).get.length > 0,
"Imm did not have a comment with length > 0")
}
}
|