Skip to content

Commit

Permalink
Consider additional forms of MutableRunnableSpec (for custom implemen…
Browse files Browse the repository at this point in the history
…tations)
  • Loading branch information
hmemcpy committed Feb 24, 2024
1 parent 099e1ae commit f151cf3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/scala/zio/intellij/testsupport/ZTestFramework.scala
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,18 @@ object ZTestFramework {
"_root_.zio.test.MutableRunnableSpec.TestBuilder"
)

private[ZTestFramework] val additionalMethodsRegex = Set(
"_root_.zio.test.*.SuiteBuilder",
"_root_.zio.test.*.TestBuilder"
)

private def expandsToTestMethod(tpe: ScType) =
tpe.extractClass.collect {
case c: ScClassImpl =>
val qname = c.qualifiedName
val canonical = (if (qname == null || qname == c.name) c.name
else "_root_." + qname) + c.typeParamString
testMethodTypes.contains(canonical)
testMethodTypes.contains(canonical) || additionalMethodsRegex.exists(canonical.matches)
}.getOrElse(false)

}

0 comments on commit f151cf3

Please sign in to comment.