add coverage support to neotest
This commit is contained in:
parent
5d7fd0a72a
commit
e3b8a2ddef
3 changed files with 174 additions and 1 deletions
|
@ -401,6 +401,10 @@ func TestInvoke(bc *core.Blockchain, tx *transaction.Transaction) (*vm.VM, error
|
|||
ttx := *tx
|
||||
ic, _ := bc.GetTestVM(trigger.Application, &ttx, b)
|
||||
|
||||
if isCoverageEnabled() {
|
||||
ic.VM.SetOnExecHook(coverageHook())
|
||||
}
|
||||
|
||||
defer ic.Finalize()
|
||||
|
||||
ic.VM.LoadWithFlags(tx.Script, callflag.All)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue