Skip to content

Commit

Permalink
Update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-mc committed Apr 9, 2024
1 parent f89fb8e commit a65b02e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1377,21 +1377,24 @@
| stmts.go:113:9:113:9 | skip | stmts.go:113:14:113:14 | x |
| stmts.go:113:14:113:14 | x | stmts.go:113:14:113:21 | type assertion |
| stmts.go:113:14:113:21 | type assertion | stmts.go:113:9:113:9 | assignment to y |
| stmts.go:114:2:115:16 | implicit type switch variable declaration | stmts.go:115:3:115:13 | selection of Println |
| stmts.go:114:7:114:11 | case error | stmts.go:114:2:115:16 | implicit type switch variable declaration |
| stmts.go:114:7:114:11 | case error | stmts.go:114:14:114:19 | case string |
| stmts.go:114:7:114:11 | case error | stmts.go:115:3:115:13 | selection of Println |
| stmts.go:114:14:114:19 | case string | stmts.go:115:3:115:13 | selection of Println |
| stmts.go:114:14:114:19 | case string | stmts.go:114:2:115:16 | implicit type switch variable declaration |
| stmts.go:114:14:114:19 | case string | stmts.go:116:7:116:13 | case float32 |
| stmts.go:115:3:115:13 | selection of Println | stmts.go:115:15:115:15 | y |
| stmts.go:115:3:115:16 | call to Println | stmts.go:123:9:123:9 | skip |
| stmts.go:115:3:115:16 | call to Println | stmts.go:137:1:137:1 | exit |
| stmts.go:115:15:115:15 | y | stmts.go:115:3:115:16 | call to Println |
| stmts.go:116:7:116:13 | case float32 | stmts.go:117:3:117:7 | test5 |
| stmts.go:116:7:116:13 | case float32 | stmts.go:120:3:120:3 | skip |
| stmts.go:116:2:118:14 | implicit type switch variable declaration | stmts.go:117:3:117:7 | test5 |
| stmts.go:116:7:116:13 | case float32 | stmts.go:116:2:118:14 | implicit type switch variable declaration |
| stmts.go:116:7:116:13 | case float32 | stmts.go:119:2:120:7 | implicit type switch variable declaration |
| stmts.go:117:3:117:7 | test5 | stmts.go:117:9:117:12 | true |
| stmts.go:117:3:117:13 | call to test5 | stmts.go:137:1:137:1 | exit |
| stmts.go:117:9:117:12 | true | stmts.go:117:3:117:13 | call to test5 |
| stmts.go:118:3:118:7 | test5 | stmts.go:118:9:118:13 | false |
| stmts.go:118:9:118:13 | false | stmts.go:118:3:118:14 | call to test5 |
| stmts.go:119:2:120:7 | implicit type switch variable declaration | stmts.go:120:3:120:3 | skip |
| stmts.go:120:3:120:3 | skip | stmts.go:120:7:120:7 | y |
| stmts.go:120:7:120:7 | y | stmts.go:123:9:123:9 | skip |
| stmts.go:123:9:123:9 | assignment to y | stmts.go:123:17:123:17 | y |
Expand Down
6 changes: 3 additions & 3 deletions go/ql/test/library-tests/semmle/go/dataflow/Switch/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ func expressionSwitch2(input string, defaultValue string) string {
}

func main() {
sink(typeSwitch1(&Type1{source()}, "default")) // $ MISSING: hasValueFlow="call to typeSwitch1"
sink(typeSwitch1(&Type2{source()}, "default")) // $ MISSING: hasValueFlow="call to typeSwitch1"
sink(typeSwitch1(&Type3{source()}, "default")) // $ MISSING: hasValueFlow="call to typeSwitch1"
sink(typeSwitch1(&Type1{source()}, "default")) // $ hasValueFlow="call to typeSwitch1"
sink(typeSwitch1(&Type2{source()}, "default")) // $ hasValueFlow="call to typeSwitch1"
sink(typeSwitch1(&Type3{source()}, "default")) // $ hasValueFlow="call to typeSwitch1"
sink(typeSwitch1(nil, source())) // $ hasValueFlow="call to typeSwitch1"

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

0 comments on commit a65b02e

Please sign in to comment.