emit: converto to Boolean in Bool()
This commit is contained in:
parent
2fd63387c0
commit
4b064e18aa
3 changed files with 3 additions and 2 deletions
|
@ -46,7 +46,7 @@ func TestConvert(t *testing.T) {
|
|||
{"int64", "[]byte{0, 1, 0}", big.NewInt(256)},
|
||||
{"int64", "[]byte{0}", big.NewInt(0)},
|
||||
{"[]byte", "true", []byte{1}},
|
||||
{"[]byte", "false", []byte{}},
|
||||
{"[]byte", "false", []byte{0}},
|
||||
{"[]byte", "12", []byte{0x0C}},
|
||||
{"[]byte", "0", []byte{}},
|
||||
{"[]byte", "[]byte{0, 1, 0}", []byte{0, 1, 0}},
|
||||
|
|
|
@ -274,7 +274,7 @@ var structTestCases = []testCase{
|
|||
vm.NewBigIntegerItem(big.NewInt(1)),
|
||||
vm.NewBigIntegerItem(big.NewInt(2)),
|
||||
vm.NewByteArrayItem([]byte("hello")),
|
||||
vm.NewByteArrayItem([]byte{}),
|
||||
vm.NewBoolItem(false),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue