Remove logging bits from script_test.go.

The allows the tests to run without showing warning for malformed bits
(which are intentionally malformed for testing purposes).  Also, the
tests would not compile since the new btclog backend was switched out.
This commit resolves that.
This commit is contained in:
Dave Collins 2013-12-10 18:25:04 -06:00
parent 18576ab105
commit c0c167cc15

View file

@ -6,12 +6,9 @@ package btcscript_test
import ( import (
"bytes" "bytes"
"fmt"
"github.com/conformal/btcscript" "github.com/conformal/btcscript"
"github.com/conformal/btcwire" "github.com/conformal/btcwire"
"github.com/conformal/seelog"
"github.com/davecgh/go-spew/spew" "github.com/davecgh/go-spew/spew"
"os"
"testing" "testing"
) )
@ -520,14 +517,6 @@ func testScript(t *testing.T, script []byte, canonical bool) (err error) {
} }
func TestScripts(t *testing.T) { func TestScripts(t *testing.T) {
log, err := seelog.LoggerFromWriterWithMinLevel(os.Stdout,
seelog.InfoLvl)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to create logger: %v", err)
return
}
defer log.Flush()
btcscript.UseLogger(log)
// for each entry in the list // for each entry in the list
for i := range opcodeTests { for i := range opcodeTests {
shouldPass := opcodeTests[i].shouldPass shouldPass := opcodeTests[i].shouldPass