From 7013cb0d7d7b78bb0160c45d13a8d7d472835513 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 7 Aug 2024 15:16:35 +0200 Subject: prog: replace MinimizeParams with MinimizeMode All callers shouldn't control lots of internal details of minimization (if we have more params, that's just more variations to test, and we don't have more, params is just a more convoluted way to say if we minimize for corpus or a crash). 2 bools also allow to express 4 options, but only 3 make sense. Also when I see MinimizeParams{} in the code, it's unclear what it means. Replace params with mode. And potentially "crash" minimization is not "light", it's just different. E.g. we can simplify int arguments for reproducers (esp in snapshot mode), but we don't need that for corpus. --- prog/expr_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prog/expr_test.go') diff --git a/prog/expr_test.go b/prog/expr_test.go index bdb4201dd..6b767cd11 100644 --- a/prog/expr_test.go +++ b/prog/expr_test.go @@ -186,7 +186,7 @@ func TestConditionalMinimize(t *testing.T) { assert.NoError(tt, err) p, err := target.Deserialize([]byte(test.input), Strict) assert.NoError(tt, err) - p1, _ := Minimize(p, 0, MinimizeParams{}, test.pred) + p1, _ := Minimize(p, 0, MinimizeCorpus, test.pred) res := p1.Serialize() assert.Equal(tt, test.output, strings.TrimSpace(string(res))) }) -- cgit mrf-deployment