Skip to content

Commit 76dced2

Browse files
committed
Replace $ with _ in generated mock class names
1 parent 5c238db commit 76dced2

File tree

1 file changed

+2
-2
lines changed
  • mokkery-plugin/src/main/kotlin/dev/mokkery/plugin/ir/transformer/mock

1 file changed

+2
-2
lines changed

mokkery-plugin/src/main/kotlin/dev/mokkery/plugin/ir/transformer/mock/BuildMockClass.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ private fun IrConstructor.addSpyParameter(classesToIntercept: List<IrClass>): Ir
254254
}
255255

256256
private fun Name.createUniqueMockName(type: String) = asString()
257-
.plus($$"$$$type$$${randomString()}")
257+
.plus("_$type}_${randomString()}")
258258
.let(Name::identifier)
259259

260260
private fun FqName.createUniqueManyMockName() = shortName()
261261
.asString()
262-
.plus($$"$$${randomString()}")
262+
.plus("_${randomString()}")
263263
.let(Name::identifier)

0 commit comments

Comments
 (0)