Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 53cfbcc

Browse files
committed
Add tests for FunctionOutput.isResult
1 parent 4206408 commit 53cfbcc

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| main.go:51:2:51:14 | call to op | main.go:51:2:51:14 | call to op | result |
2+
| main.go:53:2:53:22 | call to op2 | main.go:53:2:53:22 | call to op2 | result |
3+
| main.go:53:14:53:21 | call to bump | main.go:53:14:53:21 | call to bump | result |
4+
| tst.go:9:17:9:33 | call to new | tst.go:9:17:9:33 | call to new | result |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import go
2+
3+
from FunctionOutput outp, DataFlow::CallNode c, DataFlow::Node nodeTo
4+
where outp.isResult() and nodeTo = outp.getNode(c)
5+
select c, nodeTo, outp
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| main.go:54:10:54:15 | call to test | main.go:54:2:54:15 | ... := ...[0] | 0 | result 0 |
2+
| main.go:54:10:54:15 | call to test | main.go:54:2:54:15 | ... := ...[1] | 1 | result 1 |
3+
| main.go:56:9:56:15 | call to test2 | main.go:56:2:56:15 | ... = ...[0] | 0 | result 0 |
4+
| main.go:56:9:56:15 | call to test2 | main.go:56:2:56:15 | ... = ...[1] | 1 | result 1 |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import go
2+
3+
from FunctionOutput outp, int i, DataFlow::CallNode c, DataFlow::Node nodeTo
4+
where outp.isResult(i) and nodeTo = outp.getNode(c)
5+
select c, nodeTo, i, outp

0 commit comments

Comments
 (0)