mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Add test for expected filenames
This commit is contained in:
committed by
Ian Lynagh
parent
5ec546bcb0
commit
87b04bc22b
3
java/ql/test/kotlin/library-tests/files/otherfile.kt
Normal file
3
java/ql/test/kotlin/library-tests/files/otherfile.kt
Normal file
@@ -0,0 +1,3 @@
|
||||
package main
|
||||
|
||||
class DefinedOtherFile<T> { }
|
||||
7
java/ql/test/kotlin/library-tests/files/test.expected
Normal file
7
java/ql/test/kotlin/library-tests/files/test.expected
Normal file
@@ -0,0 +1,7 @@
|
||||
| otherfile.kt:3:1:3:29 | other | Object | Object.class | 0 |
|
||||
| test.kt:7:3:7:11 | b | String | String.class | 0 |
|
||||
| test.kt:8:3:8:24 | c | List<String> | List.class | 0 |
|
||||
| test.kt:9:3:9:28 | d | List<? extends String> | List.class | 0 |
|
||||
| test.kt:10:3:10:24 | e | DefinedHere<String> | test.kt | 14 |
|
||||
| test.kt:11:3:11:29 | f | DefinedOtherFile<String> | otherfile.kt | 3 |
|
||||
| test.kt:14:1:14:24 | other | Object | Object.class | 0 |
|
||||
14
java/ql/test/kotlin/library-tests/files/test.kt
Normal file
14
java/ql/test/kotlin/library-tests/files/test.kt
Normal file
@@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import kotlin.collections.MutableList
|
||||
|
||||
fun test(
|
||||
a: Int,
|
||||
b: String,
|
||||
c: MutableList<String>,
|
||||
d: MutableList<out String>,
|
||||
e: DefinedHere<String>,
|
||||
f: DefinedOtherFile<String>
|
||||
) { }
|
||||
|
||||
class DefinedHere<T> { }
|
||||
5
java/ql/test/kotlin/library-tests/files/test.ql
Normal file
5
java/ql/test/kotlin/library-tests/files/test.ql
Normal file
@@ -0,0 +1,5 @@
|
||||
import java
|
||||
|
||||
from Parameter p
|
||||
where p.fromSource()
|
||||
select p, p.getType().toString(), p.getType().getFile().getBaseName(), p.getType().getLocation().getStartLine()
|
||||
Reference in New Issue
Block a user