aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/utils
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/utils')
-rw-r--r--plugins/base/src/test/kotlin/utils/contentUtils.kt16
1 files changed, 11 insertions, 5 deletions
diff --git a/plugins/base/src/test/kotlin/utils/contentUtils.kt b/plugins/base/src/test/kotlin/utils/contentUtils.kt
index 38d6450c..5d8673d0 100644
--- a/plugins/base/src/test/kotlin/utils/contentUtils.kt
+++ b/plugins/base/src/test/kotlin/utils/contentUtils.kt
@@ -33,7 +33,9 @@ fun ContentMatcherBuilder<*>.bareSignature(
unwrapAnnotation(it)
}
}
- +("$visibility $modifier ${keywords.joinToString("") { "$it " }} fun")
+ if (visibility.isNotBlank()) +"$visibility "
+ if (modifier.isNotBlank()) +"$modifier "
+ +("${keywords.joinToString("") { "$it " }}fun ")
link { +name }
+"("
params.forEachIndexed { id, (n, t) ->
@@ -45,7 +47,7 @@ fun ContentMatcherBuilder<*>.bareSignature(
+it
}
- +"$n:"
+ +"$n: "
group { link { +(t.type) } }
if (id != params.lastIndex)
+", "
@@ -90,7 +92,9 @@ fun ContentMatcherBuilder<*>.bareSignatureWithReceiver(
unwrapAnnotation(it)
}
}
- +("$visibility $modifier ${keywords.joinToString("") { "$it " }} fun")
+ if (visibility != null && visibility.isNotBlank()) +"$visibility "
+ if (modifier != null && modifier.isNotBlank()) +"$modifier "
+ +("${keywords.joinToString("") { "$it " }}fun ")
group {
link { +receiver }
}
@@ -106,7 +110,7 @@ fun ContentMatcherBuilder<*>.bareSignatureWithReceiver(
+it
}
- +"$n:"
+ +"$n: "
group { link { +(t.type) } }
if (id != params.lastIndex)
+", "
@@ -150,7 +154,9 @@ fun ContentMatcherBuilder<*>.propertySignature(
unwrapAnnotation(it)
}
}
- +("$visibility $modifier ${keywords.joinToString("") { "$it " }} $preposition")
+ if (visibility.isNotBlank()) +"$visibility "
+ if (modifier.isNotBlank()) +"$modifier "
+ +("${keywords.joinToString("") { "$it " }}$preposition ")
link { +name }
if (type != null) {
+(": ")