From 1da82ae0f070bbed7300a8e9462abeeb0cf3c344 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 1 Aug 2018 19:45:15 +0200 Subject: prog: introduce debugValidate Move debug validation into a separate function. Update #538 --- prog/generation.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'prog/generation.go') diff --git a/prog/generation.go b/prog/generation.go index 860924031..df31f0271 100644 --- a/prog/generation.go +++ b/prog/generation.go @@ -22,10 +22,6 @@ func (target *Target) Generate(rs rand.Source, ncalls int, ct *ChoiceTable) *Pro p.Calls = append(p.Calls, c) } } - if debug { - if err := p.validate(); err != nil { - panic(err) - } - } + p.debugValidate() return p } -- cgit mrf-deployment