diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-09 10:33:42 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-09 10:33:42 +0200 |
commit | 23918873cbe055f22d40fa4c96651fd93186e687 (patch) | |
tree | 23a36ea4fb2aa0cd3df38abca0601e510cf0b806 /test/scaladoc/run/t7767.scala | |
parent | 48283ca80c17b2814a27464c30bca2445ffcc7a5 (diff) | |
download | scala-23918873cbe055f22d40fa4c96651fd93186e687.tar.gz scala-23918873cbe055f22d40fa4c96651fd93186e687.tar.bz2 scala-23918873cbe055f22d40fa4c96651fd93186e687.zip |
SI-7767 Test case for Scaladoc on early initializers
Diffstat (limited to 'test/scaladoc/run/t7767.scala')
-rw-r--r-- | test/scaladoc/run/t7767.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/scaladoc/run/t7767.scala b/test/scaladoc/run/t7767.scala new file mode 100644 index 0000000000..be5e9fe080 --- /dev/null +++ b/test/scaladoc/run/t7767.scala @@ -0,0 +1,20 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + + // This caused an infinite recursion in method inline() in CommentFactory.scala + override def code = """ + class Docable extends { /**Doc*/ val foo = 0 } with AnyRef + """ + + // no need for special settings + def scaladocSettings = "" + + def testModel(rootPackage: Package) = { + import access._ + // if it doesn't hang, the test is passed + val comment = rootPackage._class("Docable")._value("foo").comment.map(_.body.toString.trim).getOrElse("") + assert(comment.contains("Doc"), comment) + } +} |