Debian Codegraph @

tools/antithesis-go-instrumentor/scanners/coverage/instrumentor/testdata/golden/block_split/input.go

raw
1 package sample
2
3 // The loop body splits into multiple edges: the branch statement (break)
4 // ends a basic block, so the statements before and after it are counted
5 // separately.
6 func Scan(xs []int) int {
7 count := 0
8 for _, x := range xs {
9 count++
10 if x < 0 {
11 break
12 }
13 count++
14 }
15 return count
16 }