aboutsummaryrefslogtreecommitdiff
path: root/dottydoc/jvm/test/WhitelistedStdLib.scala
diff options
context:
space:
mode:
Diffstat (limited to 'dottydoc/jvm/test/WhitelistedStdLib.scala')
-rw-r--r--dottydoc/jvm/test/WhitelistedStdLib.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/dottydoc/jvm/test/WhitelistedStdLib.scala b/dottydoc/jvm/test/WhitelistedStdLib.scala
index bbf0b4c6b..88dc67e99 100644
--- a/dottydoc/jvm/test/WhitelistedStdLib.scala
+++ b/dottydoc/jvm/test/WhitelistedStdLib.scala
@@ -14,4 +14,19 @@ class TestWhitelistedCollections extends DottyTest {
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")
+ }
}