Skip to content

Commit

Permalink
[IR] update testdata: escape special symbols in Char and String const…
Browse files Browse the repository at this point in the history
…ant values
  • Loading branch information
bashor authored and teamcityserver committed Nov 25, 2020
1 parent 0f10b5e commit 503370c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
18 changes: 9 additions & 9 deletions compiler/testData/ir/irText/expressions/kt28006.kt.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
val test1: String
field = "🤗"
field = "\uD83E\uDD17"
get

val test2: String
field = "🤗🤗"
field = "\uD83E\uDD17\uD83E\uDD17"
get

const val testConst1: String
field = "🤗"
field = "\uD83E\uDD17"
get

const val testConst2: String
field = "🤗🤗"
field = "\uD83E\uDD17\uD83E\uDD17"
get

const val testConst3: String
field = "🤗🤗🤗"
field = "\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17"
get

const val testConst4: String
field = "🤗🤗🤗🤗"
field = "\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17"
get

fun test1(x: Int): String {
return "🤗" + x
return "\uD83E\uDD17" + x
}

fun test2(x: Int): String {
return x + "🤗"
return x + "\uD83E\uDD17"
}

fun test3(x: Int): String {
return x + "🤗" + x
return x + "\uD83E\uDD17" + x
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ val test4: String
get

val test5: String
field = "
abc
"
field = "\nabc\n"
get

val test6: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
private const val BACKSLASH: Char
field = '\'
field = '\\'
private get

private fun Reader.nextChar(): Char? {
Expand Down

0 comments on commit 503370c

Please sign in to comment.