tools/antithesis-go-instrumentor/testdata/input/main.go
raw| 1 | package main |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | |
| 6 | "github.com/antithesishq/antithesis-sdk-go/assert" |
| 7 | ) |
| 8 | |
| 9 | func foo(b bool) { |
| 10 | if b { |
| 11 | fmt.Println("b is true") |
| 12 | } else { |
| 13 | fmt.Println("b is false") |
| 14 | assert.Reachable("reached the else branch", nil) |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | func main() { |
| 19 | fmt.Println("Hello, world!") |
| 20 | assert.Always(true, "always in main", nil) |
| 21 | foo(true) |
| 22 | foo(false) |
| 23 | } |