Commit 4e9fc86f authored by Kelvin Fichter's avatar Kelvin Fichter

CREATE tests passing

parent cf113fec
......@@ -493,6 +493,7 @@ const test_ovmCREATE: TestDefinition = {
},
{
name: 'ovmCREATE => ovmCALL(ADDRESS_NONEXIST)',
expectInvalidStateAccess: true,
steps: [
{
functionName: 'ovmCREATE',
......@@ -519,7 +520,7 @@ const test_ovmCREATE: TestDefinition = {
},
{
name: 'ovmCREATE => ovmCREATE => ovmCALL(ADDRESS_NONEXIST)',
focus: true,
expectInvalidStateAccess: true,
steps: [
{
functionName: 'ovmCREATE',
......
......@@ -105,19 +105,20 @@ export class ExecutionManagerTestRunner {
)
})
if (parameter.focus) {
it.only(`should execute: ${parameter.name}`, async () => {
const itfn = parameter.focus ? it.only : it
itfn(`should execute: ${parameter.name}`, async () => {
try {
for (const step of replacedParameter.steps) {
await this.runTestStep(step)
}
})
} else {
it(`should execute: ${parameter.name}`, async () => {
for (const step of replacedParameter.steps) {
await this.runTestStep(step)
} catch (err) {
if (parameter.expectInvalidStateAccess) {
expect(err.toString()).to.contain('VM Exception while processing transaction: revert')
} else {
throw err
}
})
}
}
})
})
})
}
......
......@@ -216,8 +216,9 @@ interface TestState {
export interface TestParameter {
name: string
focus?: boolean
steps: TestStep[]
expectInvalidStateAccess?: boolean
focus?: boolean
}
export interface TestDefinition {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment