Documentation ¶
Index ¶
- Constants
- Variables
- type ArwenTestExecutor
- func (ae *ArwenTestExecutor) ExecuteScenario(scenario *mj.Scenario, fileResolver fr.FileResolver) error
- func (ae *ArwenTestExecutor) ExecuteStep(generalStep mj.Step) error
- func (ae *ArwenTestExecutor) ExecuteTest(test *mj.Test) error
- func (ae *ArwenTestExecutor) ExecuteTxStep(txStep *mj.TxStep) (*vmi.VMOutput, error)
- func (ae *ArwenTestExecutor) GetVM() vmi.VMExecutionHandler
- func (ae *ArwenTestExecutor) Reset()
Constants ¶
const ElrondProtectedKeyPrefix = "ELROND"
ElrondProtectedKeyPrefix prefixes all Elrond reserved storage. Only the protocol can write to keys starting with this.
const ElrondRewardKey = ElrondProtectedKeyPrefix + "reward"
ElrondRewardKey is the storage key where the protocol writes when sending out rewards.
Variables ¶
var TestVMType = []byte{0, 0}
TestVMType is the VM type argument we use in tests.
Functions ¶
This section is empty.
Types ¶
type ArwenTestExecutor ¶
type ArwenTestExecutor struct { World *worldhook.MockWorld // contains filtered or unexported fields }
ArwenTestExecutor parses, interprets and executes both .test.json tests and .scen.json scenarios with Arwen.
func NewArwenTestExecutor ¶
func NewArwenTestExecutor() (*ArwenTestExecutor, error)
NewArwenTestExecutor prepares a new ArwenTestExecutor instance.
func (*ArwenTestExecutor) ExecuteScenario ¶
func (ae *ArwenTestExecutor) ExecuteScenario(scenario *mj.Scenario, fileResolver fr.FileResolver) error
ExecuteScenario executes an individual test.
func (*ArwenTestExecutor) ExecuteStep ¶
func (ae *ArwenTestExecutor) ExecuteStep(generalStep mj.Step) error
ExecuteStep executes a single scenario step and updates mock state.
func (*ArwenTestExecutor) ExecuteTest ¶
func (ae *ArwenTestExecutor) ExecuteTest(test *mj.Test) error
ExecuteTest executes an individual test.
func (*ArwenTestExecutor) ExecuteTxStep ¶
ExecuteTxStep executes a tx step and updates mock state.
func (*ArwenTestExecutor) GetVM ¶
func (ae *ArwenTestExecutor) GetVM() vmi.VMExecutionHandler
GetVM yields a reference to the VMExecutionHandler used.
func (*ArwenTestExecutor) Reset ¶
func (ae *ArwenTestExecutor) Reset()
Reset clears state/world. Is called in RunAllJSONScenariosInDirectory, but not in RunSingleJSONScenario.