Skip to content

Commit 2a13754

Browse files
committed
merge tobrun's fix
1 parent 0a6567f commit 2a13754

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

processor/src/main/kotlin/com/tobrun/datacompat/DataCompatProcessor.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,9 @@ class DataCompatProcessor(
147147
// `·` below is a non-breaking space
148148
.addStatement(
149149
propertyMap.keys.joinToString(
150-
separator = "",
151-
prefix = "return \"$className(",
150+
prefix = "return \"\"\"$className(",
152151
transform = { "$it=$$it" },
153-
postfix = ")\""
152+
postfix = ")\"\"\".trimIndent()"
154153
)
155154
)
156155
.build()

processor/src/test/kotlin/com/tobrun/datacompat/SimpleTestContent.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.tobrun.datacompat
22

3-
@Suppress("MaxLineLength")
43
internal val expectedSimpleTestContent = """
54
import java.util.Objects
65
import kotlin.Any
@@ -25,8 +24,8 @@ internal val expectedSimpleTestContent = """
2524
public val age: Int,
2625
public val veryLongAndVeryDetailedDescription: String?
2726
) : EmptyInterface, EmptyInterface2 {
28-
public override fun toString() =
29-
"Person(name=%name, nickname=%nickname, age=%age, veryLongAndVeryDetailedDescription=%veryLongAndVeryDetailedDescription)"
27+
public override fun toString() = ""${"\""}Person(name=%name, nickname=%nickname, age=%age,
28+
veryLongAndVeryDetailedDescription=%veryLongAndVeryDetailedDescription)""${"\""}.trimIndent()
3029
3130
public override fun equals(other: Any?): Boolean {
3231
if (this === other) return true

0 commit comments

Comments
 (0)