compiler: add tests for GetTransactionVMState

This commit is contained in:
Anna Shaleva 2022-04-04 13:41:54 +03:00
parent 31aa90d6b5
commit 0e8bf83dda

View file

@ -89,6 +89,13 @@ func TestOracleContractValues(t *testing.T) {
require.EqualValues(t, oracle.MinimumResponseGas, native.MinimumResponseGas)
}
func TestLedgerVMStates(t *testing.T) {
require.EqualValues(t, ledger.NoneState, vm.NoneState)
require.EqualValues(t, ledger.HaltState, vm.HaltState)
require.EqualValues(t, ledger.FaultState, vm.FaultState)
require.EqualValues(t, ledger.BreakState, vm.BreakState)
}
type nativeTestCase struct {
method string
params []string
@ -151,6 +158,7 @@ func TestNativeHelpersCompile(t *testing.T) {
{"getTransaction", []string{u256}},
{"getTransactionFromBlock", []string{u256, "1"}},
{"getTransactionHeight", []string{u256}},
{"getTransactionVMState", []string{u256}},
})
runNativeTestCases(t, cs.Notary.ContractMD, "notary", []nativeTestCase{
{"lockDepositUntil", []string{u160, "123"}},