Test coverage works on basic blocks. It could be extended to short-circuiting boolean
expressions like f() && g().
Approach:
func GoCoverBool(ret bool, n int) bool {
GoCover.Count[n] = 1
return ret
}
Rewrite f() && g() to f() && GoCoverBool(true, 5) && g() and f()
|| g() to f() || GoCoverBool(false, 5) || g().
I don't know what adjustments to the downstream tools this might require.
The text was updated successfully, but these errors were encountered:
This looks possible. The only change needed would be instrumentation. Rest of the tool chain would simply work, because we already encode column info with each block.
The text was updated successfully, but these errors were encountered: