diff options
author | Joshua MacDonald <josh.macdonald@gmail.com> | 2015-11-27 23:01:59 -0800 |
---|---|---|
committer | Joshua MacDonald <josh.macdonald@gmail.com> | 2015-11-27 23:01:59 -0800 |
commit | 4b74451f9e9b976a2a0984130662f58bd39e1478 (patch) | |
tree | 096fb32c01ee704fff69d6fec77d73604c412865 /xdelta3/go/src/regtest.go | |
parent | 21ec9031bf1703fd8f82a343f31f2964b9567428 (diff) |
Regtest work
Diffstat (limited to 'xdelta3/go/src/regtest.go')
-rw-r--r-- | xdelta3/go/src/regtest.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/xdelta3/go/src/regtest.go b/xdelta3/go/src/regtest.go index 76d253c..4507b8c 100644 --- a/xdelta3/go/src/regtest.go +++ b/xdelta3/go/src/regtest.go | |||
@@ -78,8 +78,11 @@ func offsetTest(r *xdelta.Runner, p *xdelta.Program, bufsize, offset, length int | |||
78 | t.CopyStreams(enc.Stdout, dec.Stdin) | 78 | t.CopyStreams(enc.Stdout, dec.Stdin) |
79 | t.CompareStreams(dec.Stdout, read, length) | 79 | t.CompareStreams(dec.Stdout, read, length) |
80 | 80 | ||
81 | xdelta.WriteRstreams(t, "encode", seed, offset, length, enc.Srcin, enc.Stdin) | 81 | // The decoder output ("read", above) is compared with the |
82 | xdelta.WriteRstreams(t, "decode", seed, offset, length, dec.Srcin, write) | 82 | // test-provided output ("write", below). |
83 | xdelta.WriteRstreams(t, seed, offset, length, | ||
84 | t.NewDualWriter(enc.Srcin, dec.Srcin), | ||
85 | t.NewDualWriter(dec.Srcin, write)) | ||
83 | t.Wait(g, enc, dec) | 86 | t.Wait(g, enc, dec) |
84 | } | 87 | } |
85 | 88 | ||
@@ -92,10 +95,8 @@ func main() { | |||
92 | 95 | ||
93 | prog := &xdelta.Program{xdelta3} | 96 | prog := &xdelta.Program{xdelta3} |
94 | 97 | ||
95 | smokeTest(r, prog) | 98 | //smokeTest(r, prog) |
96 | for { | 99 | offsetTest(r, prog, 4 << 20, 3 << 20, 5 << 20) |
97 | offsetTest(r, prog, 4 << 20, 3 << 20, 5 << 20) | ||
98 | } | ||
99 | 100 | ||
100 | //offsetTest(r, xdelta.NewTestGroup(), prog, 1 << 31, 1 << 32, 1 << 33) | 101 | //offsetTest(r, xdelta.NewTestGroup(), prog, 1 << 31, 1 << 32, 1 << 33) |
101 | } | 102 | } |