diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-04-21 10:14:38 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-04-21 10:14:38 +0200 |
commit | efc1f198b47d1c853b8d5600dfbfb7378a38fe51 (patch) | |
tree | 239d3f08621fd43e365fb7b4164535818a63a48e /test/scaladoc/scalacheck | |
parent | 56d79460dc3e9dbec054c1459122f5b87989f4e3 (diff) | |
parent | fedbfd74f2d874ef3851f6ce2261011877ac505d (diff) | |
download | scala-efc1f198b47d1c853b8d5600dfbfb7378a38fe51.tar.gz scala-efc1f198b47d1c853b8d5600dfbfb7378a38fe51.tar.bz2 scala-efc1f198b47d1c853b8d5600dfbfb7378a38fe51.zip |
Merge commit 'fedbfd7' into merge/2.11-to-2.12-apr-21
Diffstat (limited to 'test/scaladoc/scalacheck')
-rw-r--r-- | test/scaladoc/scalacheck/CommentFactoryTest.scala | 20 | ||||
-rw-r--r-- | test/scaladoc/scalacheck/HtmlFactoryTest.scala | 4 |
2 files changed, 21 insertions, 3 deletions
diff --git a/test/scaladoc/scalacheck/CommentFactoryTest.scala b/test/scaladoc/scalacheck/CommentFactoryTest.scala index ff64a25602..d30b78087c 100644 --- a/test/scaladoc/scalacheck/CommentFactoryTest.scala +++ b/test/scaladoc/scalacheck/CommentFactoryTest.scala @@ -24,8 +24,11 @@ class Factory(val g: Global, val s: doc.Settings) } } + def getComment(s: String): Comment = + parse(s, "", scala.tools.nsc.util.NoPosition, null) + def parseComment(s: String): Option[Inline] = - strip(parse(s, "", scala.tools.nsc.util.NoPosition, null)) + strip(getComment(s)) def createBody(s: String) = parse(s, "", scala.tools.nsc.util.NoPosition, null).body @@ -166,4 +169,19 @@ object Test extends Properties("CommentFactory") { } } + property("Empty parameter text should be empty") = { + // used to fail with + // body == Body(List(Paragraph(Chain(List(Summary(Text('\n'))))))) + factory.getComment( + """ +/** + * @deprecated + */ + """).deprecated match { + case Some(Body(l)) if l.isEmpty => true + case other => + println(other) + false + } + } } diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala index 6b59355991..98a601bb20 100644 --- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala +++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala @@ -685,7 +685,7 @@ object Test extends Properties("HtmlFactory") { case node: scala.xml.Node => { val s = node.toString s.contains("<h6>Author:</h6>") && - s.contains("<p>The Only Author\n</p>") + s.contains("<p>The Only Author</p>") } case _ => false } @@ -699,7 +699,7 @@ object Test extends Properties("HtmlFactory") { val s = node.toString s.contains("<h6>Authors:</h6>") && s.contains("<p>The First Author</p>") && - s.contains("<p>The Second Author\n</p>") + s.contains("<p>The Second Author</p>") } case _ => false } |