aboutsummaryrefslogtreecommitdiffstats
path: root/prog/rand_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-01-04 10:35:26 +0100
committerDmitry Vyukov <dvyukov@google.com>2022-01-11 16:30:08 +0100
commit983508d80442a85b78118e6c6a03d5ae4897e4df (patch)
tree4d45c36a95a2ae407fa780a68925e0014c75e7e6 /prog/rand_test.go
parentbad18a53de8fa8d3d097e3d701efb72a014661cb (diff)
prog: pass ctx by pointer to ForeachType callback
This will allow callbacks to stop iteration early by setting ctx.Stop flag (as it works for ForeachArg).
Diffstat (limited to 'prog/rand_test.go')
-rw-r--r--prog/rand_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/prog/rand_test.go b/prog/rand_test.go
index 629dffaf5..030be8ec3 100644
--- a/prog/rand_test.go
+++ b/prog/rand_test.go
@@ -110,7 +110,7 @@ func TestEnabledCalls(t *testing.T) {
func TestSizeGenerateConstArg(t *testing.T) {
target, rs, iters := initRandomTargetTest(t, "test", "64")
r := newRand(target, rs)
- ForeachType(target.Syscalls, func(typ Type, ctx TypeCtx) {
+ ForeachType(target.Syscalls, func(typ Type, ctx *TypeCtx) {
if _, ok := typ.(*IntType); !ok {
return
}