mirror of
https://github.com/github/codeql.git
synced 2026-01-30 14:52:57 +01:00
Add tests for FunctionOutput.isResult
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
| main.go:51:2:51:14 | call to op | main.go:51:2:51:14 | call to op | result |
|
||||
| main.go:53:2:53:22 | call to op2 | main.go:53:2:53:22 | call to op2 | result |
|
||||
| main.go:53:14:53:21 | call to bump | main.go:53:14:53:21 | call to bump | result |
|
||||
| tst.go:9:17:9:33 | call to new | tst.go:9:17:9:33 | call to new | result |
|
||||
@@ -0,0 +1,5 @@
|
||||
import go
|
||||
|
||||
from FunctionOutput outp, DataFlow::CallNode c, DataFlow::Node nodeTo
|
||||
where outp.isResult() and nodeTo = outp.getNode(c)
|
||||
select c, nodeTo, outp
|
||||
@@ -0,0 +1,4 @@
|
||||
| main.go:54:10:54:15 | call to test | main.go:54:2:54:15 | ... := ...[0] | 0 | result 0 |
|
||||
| main.go:54:10:54:15 | call to test | main.go:54:2:54:15 | ... := ...[1] | 1 | result 1 |
|
||||
| main.go:56:9:56:15 | call to test2 | main.go:56:2:56:15 | ... = ...[0] | 0 | result 0 |
|
||||
| main.go:56:9:56:15 | call to test2 | main.go:56:2:56:15 | ... = ...[1] | 1 | result 1 |
|
||||
@@ -0,0 +1,5 @@
|
||||
import go
|
||||
|
||||
from FunctionOutput outp, int i, DataFlow::CallNode c, DataFlow::Node nodeTo
|
||||
where outp.isResult(i) and nodeTo = outp.getNode(c)
|
||||
select c, nodeTo, i, outp
|
||||
Reference in New Issue
Block a user