blob: ad9b7b1a6962611389bca293edb82a057c641dd5 (
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
|
package dotty.tools
package dottydoc
import org.junit.Test
import org.junit.Assert._
class TestSimpleComments extends DottyTest {
@Test def simpleComment = {
val source =
"""
|package scala
|
|/** Hello, world! */
|trait HelloWorld
""".stripMargin
checkSource(source) { doc =>
val traitCmt = doc
.packages("scala")
.children.find(_.path.mkString(".") == "scala.HelloWorld")
.flatMap(_.comment.map(_.body))
.get
assertEquals(traitCmt, "<p>Hello, world!</p>")
}
}
}
|