(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestOpCodeDUP(t *testing.T) { |
| 77 | log.InitLog(4) |
| 78 | defer func() { |
| 79 | os.RemoveAll("Log") |
| 80 | }() |
| 81 | |
| 82 | config := &Config{ |
| 83 | Time: 10, |
| 84 | Height: 10, |
| 85 | Tx: &types.Transaction{}, |
| 86 | } |
| 87 | |
| 88 | var code = []byte{byte(neovm.DUP)} |
| 89 | |
| 90 | sc := SmartContract{ |
| 91 | Config: config, |
| 92 | Gas: 10000, |
| 93 | CacheDB: nil, |
| 94 | } |
| 95 | engine, _ := sc.NewExecuteEngine(code, types.InvokeNeo) |
| 96 | _, err := engine.Invoke() |
| 97 | |
| 98 | assert.NotNil(t, err) |
| 99 | } |
| 100 | |
| 101 | func TestOpReadMemAttack(t *testing.T) { |
| 102 | log.InitLog(4) |
nothing calls this directly
no test coverage detected