This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"category": "Exceptions", | ||
"name": "THROW", | ||
"tests": | ||
[ | ||
{ | ||
"script": "0xF0", | ||
"trigger": "Application", | ||
"steps": | ||
[ | ||
{ | ||
"actions": | ||
[ | ||
"StepInto" | ||
], | ||
"result": | ||
{ | ||
"state": | ||
[ | ||
"Fault", | ||
"Break" | ||
], | ||
"invocationStack": | ||
[ | ||
{ | ||
"scriptHash": "0x639095273057429f0475642a711b0ff24bee5f7d", | ||
"instructionPointer": 1, | ||
"nextInstruction": "RET" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
110 changes: 110 additions & 0 deletions
110
tests/neo-vm.Tests/Tests/OpCodes/Exceptions/THROWIFNOT.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"category": "Exceptions", | ||
"name": "THROWIFNOT", | ||
"tests": | ||
[ | ||
{ | ||
"script": "0x0091F1", | ||
"trigger": "Application", | ||
"name": "Without throw exception", | ||
"steps": | ||
[ | ||
{ | ||
"actions": | ||
[ | ||
"StepInto", | ||
"StepInto", | ||
"StepInto" | ||
], | ||
"result": | ||
{ | ||
"state": | ||
[ | ||
"Break" | ||
], | ||
"invocationStack": | ||
[ | ||
{ | ||
"scriptHash": "0xB596C875BC46FB5E2DFA4C74071B6BF965D740DE", | ||
"instructionPointer": 3, | ||
"nextInstruction": "RET" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"actions": | ||
[ | ||
"StepInto" | ||
], | ||
"result": | ||
{ | ||
"state": | ||
[ | ||
"Halt", | ||
"Break" | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"script": "0x00F1", | ||
"trigger": "Application", | ||
"name": "Throw exception (with PUSH)", | ||
"steps": | ||
[ | ||
{ | ||
"actions": | ||
[ | ||
"Execute" | ||
], | ||
"result": | ||
{ | ||
"state": | ||
[ | ||
"Fault" | ||
], | ||
"invocationStack": | ||
[ | ||
{ | ||
"scriptHash": "0x58B88C67B9F19BB9BB4C2C418B44A398D722DF54", | ||
"instructionPointer": 2, | ||
"nextInstruction": "RET" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"script": "0xF1", | ||
"trigger": "Application", | ||
"name": "Throw exception (without PUSH - FAULT)", | ||
"steps": | ||
[ | ||
{ | ||
"actions": | ||
[ | ||
"Execute" | ||
], | ||
"result": | ||
{ | ||
"state": | ||
[ | ||
"Fault" | ||
], | ||
"invocationStack": | ||
[ | ||
{ | ||
"scriptHash": "0x52C8881BB60A00778972B84150C43B25A19C766E", | ||
"instructionPointer": 1, | ||
"nextInstruction": "RET" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters