Lines Matching refs:fn
29 func testFileLevelDict(t *testing.T, fn string, level int, d string) {
31 golden, err := os.Open(fn)
33 t.Errorf("%s (level=%d, dict=%q): %v", fn, level, d, err)
39 t.Errorf("%s (level=%d, dict=%q): %v", fn, level, d, err0)
42 testLevelDict(t, fn, b0, level, d)
45 func testLevelDict(t *testing.T, fn string, b0 []byte, level int, d string) {
59 t.Errorf("%s (level=%d, dict=%q): %v", fn, level, d, err)
65 t.Errorf("%s (level=%d, dict=%q): %v", fn, level, d, err)
71 t.Errorf("%s (level=%d, dict=%q): %v", fn, level, d, err)
79 t.Errorf("%s (level=%d, dict=%q): %v", fn, level, d, err1)
83 t.Errorf("%s (level=%d, dict=%q): length mismatch %d versus %d", fn, level, d, len(b0), len(b1))
88 t.Errorf("%s (level=%d, dict=%q): mismatch at %d, 0x%02x versus 0x%02x\n", fn, level, d, i, b0[i], b1[i])
94 func testFileLevelDictReset(t *testing.T, fn string, level int, dict []byte) {
97 if fn != "" {
98 b0, err = ioutil.ReadFile(fn)
100 t.Errorf("%s (level=%d): %v", fn, level, err)
120 t.Errorf("%s (level=%d): %v", fn, level, err)
133 t.Errorf("%s (level=%d): %v", fn, level, err)
140 fn, level, len(out2), len(out))
158 for i, fn := range filenames {
159 testFileLevelDict(t, fn, DefaultCompression, "")
160 testFileLevelDict(t, fn, NoCompression, "")
161 testFileLevelDict(t, fn, HuffmanOnly, "")
163 testFileLevelDict(t, fn, level, "")
176 for i, fn := range filenames {
177 testFileLevelDict(t, fn, DefaultCompression, dictionary)
178 testFileLevelDict(t, fn, NoCompression, dictionary)
179 testFileLevelDict(t, fn, HuffmanOnly, dictionary)
181 testFileLevelDict(t, fn, level, dictionary)
194 for _, fn := range filenames {
195 testFileLevelDictReset(t, fn, NoCompression, nil)
196 testFileLevelDictReset(t, fn, DefaultCompression, nil)
197 testFileLevelDictReset(t, fn, HuffmanOnly, nil)
198 testFileLevelDictReset(t, fn, NoCompression, []byte(dictionary))
199 testFileLevelDictReset(t, fn, DefaultCompression, []byte(dictionary))
200 testFileLevelDictReset(t, fn, HuffmanOnly, []byte(dictionary))
205 testFileLevelDictReset(t, fn, level, nil)