aboutsummaryrefslogtreecommitdiffstats
path: root/prog/minimization_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-07-26 10:29:11 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-07-26 10:29:36 +0200
commitcf49ed5769e95e2146c56883ebc957b22713381a (patch)
tree573a3997d46332dc2a89fe3f65d7c5606ebf2b15 /prog/minimization_test.go
parent091bb0070faa61066041adf59b088a7a873a480d (diff)
prog: don't minimize ProcType to 0
Default value for ProcType is 0 (same for all PID's). Usually 0 either does not make sense at all or make different PIDs collide (since we use ProcType to separate value ranges for different PIDs). So don't change ProcType to 0 unless the type is explicitly marked as opt (in that case we will also generate 0 anyway).
Diffstat (limited to 'prog/minimization_test.go')
-rw-r--r--prog/minimization_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/prog/minimization_test.go b/prog/minimization_test.go
index cb651d878..3fde47c77 100644
--- a/prog/minimization_test.go
+++ b/prog/minimization_test.go
@@ -141,6 +141,14 @@ func TestMinimize(t *testing.T) {
"test$res1(r0)\n",
-1,
},
+ {
+ "test", "64",
+ "minimize$0(0x1, 0x1)\n",
+ -1,
+ func(p *Prog, callIndex int) bool { return len(p.Calls) == 1 },
+ "minimize$0(0x1, 0xffffffffffffffff)\n",
+ -1,
+ },
}
t.Parallel()
for ti, test := range tests {