Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
344 changes: 344 additions & 0 deletions tests/Neo.VM.Tests/Tests/OpCodes/Arithmetic/MODPOW.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,350 @@
}
}
]
},
{
"name": "(3 ^ 4) % 5 == 1",
"script": [
"PUSH3",
"PUSH4",
"PUSH5",
"MODPOW"
],
"steps": [
{
"actions": [
"stepInto",
"stepInto",
"stepInto"
],
"result": {
"state": "BREAK",
"invocationStack": [
{
"instructionPointer": 3,
"nextInstruction": "MODPOW",
"evaluationStack": [
{
"type": "Integer",
"value": 5
},
{
"type": "Integer",
"value": 4
},
{
"type": "Integer",
"value": 3
}
]
}
]
}
},
{
"actions": [
"execute"
],
"result": {
"state": "HALT",
"invocationStack": [],
"resultStack": [
{
"type": "Integer",
"value": 1
}
]
}
}
]
},
{
"name": "(-1 ^ 3) % 3 == -1",
"script": [
"PUSHM1",
"PUSH3",
"PUSH3",
"MODPOW"
],
"steps": [
{
"actions": [
"stepInto",
"stepInto",
"stepInto"
],
"result": {
"state": "BREAK",
"invocationStack": [
{
"instructionPointer": 3,
"nextInstruction": "MODPOW",
"evaluationStack": [
{
"type": "Integer",
"value": 3
},
{
"type": "Integer",
"value": 3
},
{
"type": "Integer",
"value": -1
}
]
}
]
}
},
{
"actions": [
"execute"
],
"result": {
"state": "HALT",
"invocationStack": [],
"resultStack": [
{
"type": "Integer",
"value": -1
}
]
}
}
]
},
{
"name": "(-1 ^ 3) % -3 == -1",
"script": [
"PUSHM1",
"PUSH3",
"PUSH3",
"NEGATE",
"MODPOW"
],
"steps": [
{
"actions": [
"stepInto",
"stepInto",
"stepInto",
"stepInto"
],
"result": {
"state": "BREAK",
"invocationStack": [
{
"instructionPointer": 4,
"nextInstruction": "MODPOW",
"evaluationStack": [
{
"type": "Integer",
"value": -3
},
{
"type": "Integer",
"value": 3
},
{
"type": "Integer",
"value": -1
}
]
}
]
}
},
{
"actions": [
"execute"
],
"result": {
"state": "HALT",
"invocationStack": [],
"resultStack": [
{
"type": "Integer",
"value": -1
}
]
}
}
]
},
{
"name": "(-3 ^ 5) % -5 == -3",
"script": [
"PUSH3",
"NEGATE",
"PUSH5",
"PUSH5",
"NEGATE",
"MODPOW"
],
"steps": [
{
"actions": [
"stepInto",
"stepInto",
"stepInto",
"stepInto",
"stepInto"
],
"result": {
"state": "BREAK",
"invocationStack": [
{
"instructionPointer": 5,
"nextInstruction": "MODPOW",
"evaluationStack": [
{
"type": "Integer",
"value": -5
},
{
"type": "Integer",
"value": 5
},
{
"type": "Integer",
"value": -3
}
]
}
]
}
},
{
"actions": [
"execute"
],
"result": {
"state": "HALT",
"invocationStack": [],
"resultStack": [
{
"type": "Integer",
"value": -3
}
]
}
}
]
},
{
"name": "(3 ^ 4) % -5 == 1",
"script": [
"PUSH3",
"PUSH4",
"PUSH5",
"NEGATE",
"MODPOW"
],
"steps": [
{
"actions": [
"stepInto",
"stepInto",
"stepInto",
"stepInto"
],
"result": {
"state": "BREAK",
"invocationStack": [
{
"instructionPointer": 4,
"nextInstruction": "MODPOW",
"evaluationStack": [
{
"type": "Integer",
"value": -5
},
{
"type": "Integer",
"value": 4
},
{
"type": "Integer",
"value": 3
}
]
}
]
}
},
{
"actions": [
"execute"
],
"result": {
"state": "HALT",
"invocationStack": [],
"resultStack": [
{
"type": "Integer",
"value": 1
}
]
}
}
]
},
{
"name": "(5 ^ -1) % 4 == 1",
"script": [
"PUSH5",
"PUSHM1",
"PUSH4",
"MODPOW"
],
"steps": [
{
"actions": [
"stepInto",
"stepInto",
"stepInto"
],
"result": {
"state": "BREAK",
"invocationStack": [
{
"instructionPointer": 3,
"nextInstruction": "MODPOW",
"evaluationStack": [
{
"type": "Integer",
"value": 4
},
{
"type": "Integer",
"value": -1
},
{
"type": "Integer",
"value": 5
}
]
}
]
}
},
{
"actions": [
"execute"
],
"result": {
"state": "HALT",
"invocationStack": [],
"resultStack": [
{
"type": "Integer",
"value": 1
}
]
}
}
]
}
]
}
Loading