(t *testing.T)
| 107 | } |
| 108 | |
| 109 | func TestScript_SerializeUnSerialize(t *testing.T) { |
| 110 | var buf bytes.Buffer |
| 111 | |
| 112 | testScript := NewEmptyScript() |
| 113 | testScript.Serialize(&buf) |
| 114 | |
| 115 | serializeSize := testScript.SerializeSize() |
| 116 | encodeSize := testScript.EncodeSize() |
| 117 | |
| 118 | resultScript := NewEmptyScript() |
| 119 | resultScript.Unserialize(&buf, false) |
| 120 | |
| 121 | flag := testScript.IsEqual(resultScript) |
| 122 | |
| 123 | assert.Equal(t, testScript, resultScript) |
| 124 | assert.Equal(t, serializeSize, encodeSize) |
| 125 | assert.Equal(t, true, flag) |
| 126 | } |
| 127 | |
| 128 | func TestScript_IsSpendable(t *testing.T) { |
| 129 | tests := []struct { |
nothing calls this directly
no test coverage detected