| OLD | NEW |
| 1 package deduplicator | 1 package deduplicator |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "testing" | 4 "testing" |
| 5 | 5 |
| 6 » "go.skia.org/infra/fuzzer/go/frontend/data" | 6 » "go.skia.org/infra/fuzzer/go/data" |
| 7 ) | 7 ) |
| 8 | 8 |
| 9 func TestSimpleDeduplication(t *testing.T) { | 9 func TestSimpleDeduplication(t *testing.T) { |
| 10 d := New() | 10 d := New() |
| 11 r1 := data.MockReport("skpicture", "aaaa") | 11 r1 := data.MockReport("skpicture", "aaaa") |
| 12 r2 := data.MockReport("skpicture", "bbbb") | 12 r2 := data.MockReport("skpicture", "bbbb") |
| 13 // mock report ffff and aaaa are the same, except for the name. | 13 // mock report ffff and aaaa are the same, except for the name. |
| 14 r3 := data.MockReport("skpicture", "ffff") | 14 r3 := data.MockReport("skpicture", "ffff") |
| 15 if !d.IsUnique(r1) { | 15 if !d.IsUnique(r1) { |
| 16 t.Errorf("The deduplicator has not seen %#v, but said it has", r
1) | 16 t.Errorf("The deduplicator has not seen %#v, but said it has", r
1) |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 a, b, c, d := r%n, (r+1)%n, (r+2)%n, (r+3)%n | 191 a, b, c, d := r%n, (r+1)%n, (r+2)%n, (r+3)%n |
| 192 st.Frames = append(st.Frames, data.FullStackFrame(names[a], name
s[b], names[c], d)) | 192 st.Frames = append(st.Frames, data.FullStackFrame(names[a], name
s[b], names[c], d)) |
| 193 r = (r + 4) % n | 193 r = (r + 4) % n |
| 194 } | 194 } |
| 195 return st | 195 return st |
| 196 } | 196 } |
| 197 | 197 |
| 198 func makeFlags(start, count int) []string { | 198 func makeFlags(start, count int) []string { |
| 199 return names[start:(start + count)] | 199 return names[start:(start + count)] |
| 200 } | 200 } |
| OLD | NEW |