Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

More unit tests #81

Merged
merged 17 commits into from
Mar 7, 2019
321 changes: 321 additions & 0 deletions tests/neo-vm.Tests/Tests/OpCodes/Arrays/ARRAYSIZE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,321 @@
{
"category": "Arrays",
"name": "ARRAYSIZE",
"tests":
[
{
"name": "Wrong type SYSCALL[System.ExecutionEngine.GetScriptContainer]+ARRAYSIZE",
"script": "0x682953797374656D2E457865637574696F6E456E67696E652E476574536372697074436F6E7461696E6572C0",
"message": "0x00",
"steps":
[
{
"actions":
[
"StepInto"
],
"result":
{
"state":
[
"Break"
],
"invocationStack":
[
{
"scriptHash": "0xB8CE783B577DFDFBCDB6598C4B592AAB2C7EAD88",
"instructionPointer": 43,
"nextInstruction": "ARRAYSIZE",
"evaluationStack":
[
{
"type": "Interop",
"value": "MessageProvider"
}
]
}
]
}
},
{
"actions":
[
"StepInto"
],
"result":
{
"state":
[
"Fault",
"Break"
],
"invocationStack":
[
{
"scriptHash": "0xB8CE783B577DFDFBCDB6598C4B592AAB2C7EAD88",
"instructionPointer": 44,
"nextInstruction": "RET"
}
]
}
}
]
},
{
"name": "Without PUSH+ARRAYSIZE",
"script": "0xC0",
"steps":
[
{
"actions":
[
"StepInto"
],
"result":
{
"state":
[
"Fault",
"Break"
],
"invocationStack":
[
{
"scriptHash": "0x0D37A6FE661C22C9A39E0404DC0306AFEFEC75BD",
"instructionPointer": 1,
"nextInstruction": "RET"
}
]
}
}
]
},
{
"name": "Real test with ByteArray",
"script": "0x0100C0",
"steps":
[
{
"actions":
[
"StepInto",
"StepInto"
],
"result":
{
"state":
[
"Break"
],
"invocationStack":
[
{
"scriptHash": "0x3379880993AE5BBE84C15D937F98A53397118565",
"instructionPointer": 3,
"nextInstruction": "RET",
"evaluationStack":
[
{
"type": "Integer",
"value": 1
}
]
}
]
}
},
{
"actions":
[
"Execute"
],
"result":
{
"state":
[
"Halt"
],
"resultStack":
[
{
"type": "Integer",
"value": 1
}
]
}
}
]
},
{
"name": "Real test with array",
"script": "0x53C5C0",
"steps":
[
{
"actions":
[
"StepInto",
"StepInto",
"StepInto"
],
"result":
{
"state":
[
"Break"
],
"invocationStack":
[
{
"scriptHash": "0x6CD0C4570CEF94331D71BF26E7F3F0DABF5DF6F2",
"instructionPointer": 3,
"nextInstruction": "RET",
"evaluationStack":
[
{
"type": "Integer",
"value": 3
}
]
}
]
}
},
{
"actions":
[
"Execute"
],
"result":
{
"state":
[
"Halt"
],
"resultStack":
[
{
"type": "Integer",
"value": 3
}
]
}
}
]
},
{
"name": "Real test with struct",
"script": "0x53C6C0",
"steps":
[
{
"actions":
[
"StepInto",
"StepInto",
"StepInto"
],
"result":
{
"state":
[
"Break"
],
"invocationStack":
[
{
"scriptHash": "0x20601A03C915AF0E24732CD2B1387690C88A4DFE",
"instructionPointer": 3,
"nextInstruction": "RET",
"evaluationStack":
[
{
"type": "Integer",
"value": 3
}
]
}
]
}
},
{
"actions":
[
"Execute"
],
"result":
{
"state":
[
"Halt"
],
"resultStack":
[
{
"type": "Integer",
"value": 3
}
]
}
}
]
},
{
"name": "Real test with map",
"script": "0xC7C0",
"steps":
[
{
"actions":
[
"StepInto",
"StepInto"
],
"result":
{
"state":
[
"Break"
],
"invocationStack":
[
{
"scriptHash": "0x8B93870AC6D61A02EDA7F976D4523A5BCE4997B6",
"instructionPointer": 2,
"nextInstruction": "RET",
"evaluationStack":
[
{
"type": "Integer",
"value": 0
}
]
}
]
}
},
{
"actions":
[
"StepInto"
],
"result":
{
"state":
[
"Halt",
"Break"
],
"resultStack":
[
{
"type": "Integer",
"value": 0
}
]
}
}
]
}
]
}
Loading