Scratch: test alignment of inlays
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ class InlayScratchFileRenderer(val text: String, private val outputType: Scratch
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "${outputType.name}: ${text.trim()}"
|
return "${text.takeWhile { it.isWhitespace() }}${outputType.name}: ${text.trim()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ class InlayScratchFileRenderer(val text: String, private val outputType: Scratch
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "${outputType.name}: ${text.trim()}"
|
return "${text.takeWhile { it.isWhitespace() }}${outputType.name}: ${text.trim()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ abstract class AbstractScratchRunActionTest : FileEditorManagerTestCase() {
|
|||||||
.filterIsInstance<InlayScratchFileRenderer>()
|
.filterIsInstance<InlayScratchFileRenderer>()
|
||||||
.forEach {
|
.forEach {
|
||||||
val str = it.toString()
|
val str = it.toString()
|
||||||
val offset = doc.getLineEndOffset(line); actualOutput.insert(offset, " // $str")
|
val offset = doc.getLineEndOffset(line); actualOutput.insert(offset, "${str.takeWhile { it.isWhitespace() }}// ${str.trim()}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user