(t *testing.T)
| 32 | ) |
| 33 | |
| 34 | func TestConvertNeoVmTypeHexString(t *testing.T) { |
| 35 | code := `00c57676c8681553797374656d2e52756e74696d652e4e6f74696679` |
| 36 | |
| 37 | hex, err := common.HexToBytes(code) |
| 38 | |
| 39 | if err != nil { |
| 40 | t.Fatal("hex to byte error:", err) |
| 41 | } |
| 42 | |
| 43 | config := &smartcontract.Config{ |
| 44 | Time: 10, |
| 45 | Height: 10, |
| 46 | Tx: nil, |
| 47 | } |
| 48 | sc := smartcontract.SmartContract{ |
| 49 | Config: config, |
| 50 | Gas: 100000, |
| 51 | } |
| 52 | engine, err := sc.NewExecuteEngine(hex, types.InvokeNeo) |
| 53 | |
| 54 | _, err = engine.Invoke() |
| 55 | |
| 56 | assert.Error(t, err, "over max parameters convert length") |
| 57 | } |
| 58 | |
| 59 | func BenchmarkExecuteAdd(b *testing.B) { |
| 60 | code := []byte{byte(neovm.PUSH1)} |
nothing calls this directly
no test coverage detected