Kotlin: Add tests for long comments

This commit is contained in:
Ian Lynagh
2022-02-28 12:33:37 +00:00
parent 9af99c584e
commit 4454ef7f95
3 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
| long_comments.kt:11:1:11:1048575 | long_comments.kt:11:1:11:1048575 | 1048575 | //A01...BBBBC | KtComment |
| long_comments.kt:12:1:12:1048576 | long_comments.kt:12:1:12:1048576 | 1048576 | //A02...BBBCD | KtComment |
| long_comments.kt:13:1:13:1048577 | long_comments.kt:13:1:13:1048577 | 1048576 | //A03...BBBCD | KtComment |
| long_comments.kt:14:1:14:1048578 | long_comments.kt:14:1:14:1048578 | 1048576 | //A04...BBBCD | KtComment |

View File

@@ -0,0 +1,12 @@
import java
from KtComment c, string s, int len
where s = c.getText()
and len = s.length()
// Ignore the comments that are describing what's going on, and only
// select the large ones
and len > 1000
select c.getLocation(),
len,
s.prefix(5) + "..." + s.suffix(len - 5),
c.getPrimaryQlClasses()

File diff suppressed because one or more lines are too long