Tests disassembling the instructions for invalid evm code
(t *testing.T)
| 42 | |
| 43 | // Tests disassembling the instructions for invalid evm code |
| 44 | func TestInstructionIteratorInvalid(t *testing.T) { |
| 45 | cnt := 0 |
| 46 | script, _ := hex.DecodeString("6100") |
| 47 | |
| 48 | it := NewInstructionIterator(script) |
| 49 | for it.Next() { |
| 50 | cnt++ |
| 51 | } |
| 52 | |
| 53 | if it.Error() == nil { |
| 54 | t.Errorf("Expected an error, but got %v instead.", cnt) |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // Tests disassembling the instructions for empty evm code |
| 59 | func TestInstructionIteratorEmpty(t *testing.T) { |
nothing calls this directly
no test coverage detected