aboutsummaryrefslogtreecommitdiffstats
path: root/prog/prog_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-14 16:42:00 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-17 21:19:13 +0100
commit80d43738f1e4c648ccfc4599e17dc8ba455fe1ea (patch)
treea2adb84b67e9d760a35fee40ddf06d271f70bab1 /prog/prog_test.go
parenta2f9a446496d23c4bf6db95e0d4337583595c78c (diff)
prog: rename target.SanitizeCall to Neutralize
We will need a wrapper for target.SanitizeCall that will do more than just calling the target-provided function. To avoid confusion and potential mistakes, give the target function and prog function different names. Prog package will continue to call this "sanitize", which will include target's "neutralize" + more. Also refactor API a bit: we need a helper function that sanitizes the whole program because that's needed most of the time. Fixes #477 Fixes #502
Diffstat (limited to 'prog/prog_test.go')
-rw-r--r--prog/prog_test.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/prog/prog_test.go b/prog/prog_test.go
index 3a3577328..16a54e2d6 100644
--- a/prog/prog_test.go
+++ b/prog/prog_test.go
@@ -441,9 +441,7 @@ func TestSanitizeRandom(t *testing.T) {
for i := 0; i < iters; i++ {
p := target.Generate(rs, 10, nil)
s0 := string(p.Serialize())
- for _, c := range p.Calls {
- target.SanitizeCall(c)
- }
+ p.sanitizeFix()
s1 := string(p.Serialize())
if s0 != s1 {
t.Fatalf("non-sanitized program or non-idempotent sanitize\nwas: %v\ngot: %v", s0, s1)