OSDN Git Service

fix unit test for ispushdata (#1132)
authoroysheng <33340252+oysheng@users.noreply.github.com>
Thu, 12 Jul 2018 06:35:13 +0000 (14:35 +0800)
committerPaladz <yzhu101@uottawa.ca>
Thu, 12 Jul 2018 06:35:13 +0000 (14:35 +0800)
protocol/vm/ops_test.go

index bac92bc..da09cf8 100644 (file)
@@ -2,6 +2,7 @@ package vm
 
 import (
        "fmt"
+       "reflect"
        "testing"
 
        "github.com/bytom/errors"
@@ -172,7 +173,7 @@ func TestIsPushData(t *testing.T) {
                } else if c.wantErr != nil {
                        t.Logf("check err success")
                } else {
-                       t.Errorf("check false: %v -- %v", ops[OP_1].fn, ops[c.want.Op].fn)
+                       t.Errorf("check false: %v -- %v", reflect.ValueOf(ops[OP_1].fn), reflect.ValueOf(ops[c.want.Op].fn))
                }
        }
 }