Skip to content

Commit

Permalink
in a Scalacheck test, aavoid nesting properties
Browse files Browse the repository at this point in the history
because doing so runs afoul of typelevel/scalacheck#677
  • Loading branch information
SethTisue committed Nov 10, 2022
1 parent 1860378 commit 35a857b
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions test/scalacheck/scala/tools/nsc/scaladoc/HtmlFactoryTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -660,20 +660,16 @@ object HtmlFactoryTest extends Properties("HtmlFactory") {
val files = createTemplates("basic.scala")
//println(files)

property("class") = files.get("com/example/p1/Clazz.html") match {
case Some(node: scala.xml.Node) => {
property("implicit conversion") =
node.toString contains "<span class=\"modifier\">implicit </span>"

property("gt4s") =
node.toString contains "title=\"gt4s: $colon$colon\""

property("gt4s of a deprecated method") =
node.toString contains "title=\"gt4s: $colon$colon$colon$colon. Deprecated: "
true
}
case _ => false
locally {
val node = files.get("com/example/p1/Clazz.html").get
property("implicit conversion") =
node.toString contains "<span class=\"modifier\">implicit </span>"
property("gt4s") =
node.toString contains "title=\"gt4s: $colon$colon\""
property("gt4s of a deprecated method") =
node.toString contains "title=\"gt4s: $colon$colon$colon$colon. Deprecated: "
}

property("package") = files.get("com/example/p1/index.html") != None

property("package object") = files("com/example/p1/index.html") match {
Expand Down

0 comments on commit 35a857b

Please sign in to comment.