From 4b74451f9e9b976a2a0984130662f58bd39e1478 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 27 Nov 2015 23:01:59 -0800 Subject: Regtest work --- xdelta3/go/src/regtest.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'xdelta3/go/src/regtest.go') 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 t.CopyStreams(enc.Stdout, dec.Stdin) t.CompareStreams(dec.Stdout, read, length) - xdelta.WriteRstreams(t, "encode", seed, offset, length, enc.Srcin, enc.Stdin) - xdelta.WriteRstreams(t, "decode", seed, offset, length, dec.Srcin, write) + // The decoder output ("read", above) is compared with the + // test-provided output ("write", below). + xdelta.WriteRstreams(t, seed, offset, length, + t.NewDualWriter(enc.Srcin, dec.Srcin), + t.NewDualWriter(dec.Srcin, write)) t.Wait(g, enc, dec) } @@ -92,10 +95,8 @@ func main() { prog := &xdelta.Program{xdelta3} - smokeTest(r, prog) - for { - offsetTest(r, prog, 4 << 20, 3 << 20, 5 << 20) - } + //smokeTest(r, prog) + offsetTest(r, prog, 4 << 20, 3 << 20, 5 << 20) //offsetTest(r, xdelta.NewTestGroup(), prog, 1 << 31, 1 << 32, 1 << 33) } -- cgit v1.2.3