Kotlin: Add a test for truncated literals

This commit is contained in:
Ian Lynagh
2022-02-25 17:11:30 +00:00
parent 6c19409804
commit 1d824a4e2f
3 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
| long_string.kt:12:31:12:1048605 | long_string.kt:12:31:12:1048605 | 1048575 | ABBBB...BBBBC | StringLiteral |
| long_string.kt:13:31:13:1048606 | long_string.kt:13:31:13:1048606 | 1048576 | ABBBB...BBBCD | StringLiteral |
| long_string.kt:14:31:14:1048607 | long_string.kt:14:31:14:1048607 | 1048576 | ABBBB...BBBCD | StringLiteral |
| long_string.kt:15:31:15:1048608 | long_string.kt:15:31:15:1048608 | 1048576 | ABBBB...BBBCD | StringLiteral |

View File

@@ -0,0 +1,8 @@
import java
from Literal l, int len
where len = l.getValue().length()
select l.getLocation(),
len,
l.getValue().prefix(5) + "..." + l.getValue().suffix(len - 5),
l.getPrimaryQlClasses()

File diff suppressed because one or more lines are too long