Skip to content

Commit 74711ec

Browse files
committed
Update test expectations
1 parent a6540f8 commit 74711ec

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph/CFG.expected

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,21 +1378,24 @@ edges
13781378
| stmts.go:113:9:113:9 | skip | stmts.go:113:14:113:14 | x |
13791379
| stmts.go:113:14:113:14 | x | stmts.go:113:14:113:21 | type assertion |
13801380
| stmts.go:113:14:113:21 | type assertion | stmts.go:113:9:113:9 | assignment to y |
1381+
| stmts.go:114:2:115:16 | implicit type switch variable declaration | stmts.go:115:3:115:13 | selection of Println |
1382+
| stmts.go:114:7:114:11 | case error | stmts.go:114:2:115:16 | implicit type switch variable declaration |
13811383
| stmts.go:114:7:114:11 | case error | stmts.go:114:14:114:19 | case string |
1382-
| stmts.go:114:7:114:11 | case error | stmts.go:115:3:115:13 | selection of Println |
1383-
| stmts.go:114:14:114:19 | case string | stmts.go:115:3:115:13 | selection of Println |
1384+
| stmts.go:114:14:114:19 | case string | stmts.go:114:2:115:16 | implicit type switch variable declaration |
13841385
| stmts.go:114:14:114:19 | case string | stmts.go:116:7:116:13 | case float32 |
13851386
| stmts.go:115:3:115:13 | selection of Println | stmts.go:115:15:115:15 | y |
13861387
| stmts.go:115:3:115:16 | call to Println | stmts.go:123:9:123:9 | skip |
13871388
| stmts.go:115:3:115:16 | call to Println | stmts.go:137:1:137:1 | exit |
13881389
| stmts.go:115:15:115:15 | y | stmts.go:115:3:115:16 | call to Println |
1389-
| stmts.go:116:7:116:13 | case float32 | stmts.go:117:3:117:7 | test5 |
1390-
| stmts.go:116:7:116:13 | case float32 | stmts.go:120:3:120:3 | skip |
1390+
| stmts.go:116:2:118:14 | implicit type switch variable declaration | stmts.go:117:3:117:7 | test5 |
1391+
| stmts.go:116:7:116:13 | case float32 | stmts.go:116:2:118:14 | implicit type switch variable declaration |
1392+
| stmts.go:116:7:116:13 | case float32 | stmts.go:119:2:120:7 | implicit type switch variable declaration |
13911393
| stmts.go:117:3:117:7 | test5 | stmts.go:117:9:117:12 | true |
13921394
| stmts.go:117:3:117:13 | call to test5 | stmts.go:137:1:137:1 | exit |
13931395
| stmts.go:117:9:117:12 | true | stmts.go:117:3:117:13 | call to test5 |
13941396
| stmts.go:118:3:118:7 | test5 | stmts.go:118:9:118:13 | false |
13951397
| stmts.go:118:9:118:13 | false | stmts.go:118:3:118:14 | call to test5 |
1398+
| stmts.go:119:2:120:7 | implicit type switch variable declaration | stmts.go:120:3:120:3 | skip |
13961399
| stmts.go:120:3:120:3 | skip | stmts.go:120:7:120:7 | y |
13971400
| stmts.go:120:7:120:7 | y | stmts.go:123:9:123:9 | skip |
13981401
| stmts.go:123:9:123:9 | assignment to y | stmts.go:123:17:123:17 | y |

go/ql/test/library-tests/semmle/go/dataflow/Switch/switch.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ func expressionSwitch2(input string, defaultValue string) string {
8080
}
8181

8282
func main() {
83-
sink(typeSwitch1(&Type1{source()}, "default")) // $ MISSING: hasValueFlow="call to typeSwitch1"
84-
sink(typeSwitch1(&Type2{source()}, "default")) // $ MISSING: hasValueFlow="call to typeSwitch1"
85-
sink(typeSwitch1(&Type3{source()}, "default")) // $ MISSING: hasValueFlow="call to typeSwitch1"
83+
sink(typeSwitch1(&Type1{source()}, "default")) // $ hasValueFlow="call to typeSwitch1"
84+
sink(typeSwitch1(&Type2{source()}, "default")) // $ hasValueFlow="call to typeSwitch1"
85+
sink(typeSwitch1(&Type3{source()}, "default")) // $ hasValueFlow="call to typeSwitch1"
8686
sink(typeSwitch1(nil, source())) // $ hasValueFlow="call to typeSwitch1"
8787

8888
sink(typeSwitch2(&Type1{source()}, "default")) // $ hasValueFlow="call to typeSwitch2"

0 commit comments

Comments
 (0)