Skip to content

Commit

Permalink
fix: Adapt tests for the EVM emulator (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov authored Nov 20, 2024
1 parent 2253941 commit 1d95d21
Show file tree
Hide file tree
Showing 4 changed files with 223 additions and 2 deletions.
2 changes: 1 addition & 1 deletion solidity/complex/parser/svg/test_evm.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ "targets": [ "evm" ], "modes": [ "E", "Y+", "I+" ], "cases": [ {
{ "targets": [ "evm" ], "modes": [ "E+", "Y+", "I+" ], "cases": [ {
"name": "default",
"inputs": [],
"expected": []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"targets": [ "eravm" ],
"cases": [
{
"name": "zero_runtime",
Expand Down
219 changes: 219 additions & 0 deletions solidity/complex/yul_instructions/calldatasize/test_evm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
{
"targets": [ "evm" ],
"cases": [
{
"name": "zero_runtime",
"inputs": [
{
"instance": "Main",
"method": "runtime",
"calldata": [
"0"
]
}
],
"expected": [
"1",
"0"
]
}, {
"name": "one_runtime",
"inputs": [
{
"instance": "Main",
"method": "runtime",
"calldata": [
"1"
]
}
],
"expected": [
"1",
"1"
]
}, {
"name": "small_ordinar_runtime",
"inputs": [
{
"instance": "Main",
"method": "runtime",
"calldata": [
"19"
]
}
],
"expected": [
"1",
"19"
]
}, {
"name": "word_runtime",
"inputs": [
{
"instance": "Main",
"method": "runtime",
"calldata": [
"32"
]
}
],
"expected": [
"1",
"32"
]
}, {
"name": "ordinar_runtime",
"inputs": [
{
"instance": "Main",
"method": "runtime",
"calldata": [
"2383"
]
}
],
"expected": [
"1",
"2383"
]
}, {
"name": "ordinar_words_runtime",
"inputs": [
{
"instance": "Main",
"method": "runtime",
"calldata": [
"0xF100"
]
}
],
"expected": [
"1",
"0xF100"
]
}, {
"name": "zero_deploy",
"inputs": [
{
"instance": "Main",
"method": "deploy",
"calldata": [
"0"
]
}
],
"expected": {
"return_data": ["1"],
"events": [
{
"topics": [],
"values": ["0"]
}
]
}
}, {
"name": "one_deploy",
"inputs": [
{
"instance": "Main",
"method": "deploy",
"calldata": [
"1"
]
}
],
"expected": {
"return_data": ["1"],
"events": [
{
"topics": [],
"values": ["0"]
}
]
}
}, {
"name": "small_ordinar_deploy",
"inputs": [
{
"instance": "Main",
"method": "deploy",
"calldata": [
"19"
]
}
],
"expected": {
"return_data": ["1"],
"events": [
{
"topics": [],
"values": ["0"]
}
]
}
}, {
"name": "word_deploy",
"inputs": [
{
"instance": "Main",
"method": "deploy",
"calldata": [
"32"
]
}
],
"expected": {
"return_data": ["1"],
"events": [
{
"topics": [],
"values": ["0"]
}
]
}
}, {
"name": "ordinar_deploy",
"inputs": [
{
"instance": "Main",
"method": "deploy",
"calldata": [
"2383"
]
}
],
"expected": {
"return_data": ["1"],
"events": [
{
"topics": [],
"values": ["0"]
}
]
}
}, {
"name": "ordinar_words_deploy",
"inputs": [
{
"instance": "Main",
"method": "deploy",
"calldata": [
"49020"
]
}
],
"expected": {
"return_data": ["1"],
"events": [
{
"topics": [],
"values": ["0"]
}
]
}
}
],
"contracts": {
"Main": "main.sol:Main"
}
}
3 changes: 2 additions & 1 deletion solidity/simple/function/function_type/f2.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! { "cases": [ {
//! { "targets": [ "eravm" ],
//! "cases": [ {
//! "name": "test",
//! "inputs": [
//! {
Expand Down

0 comments on commit 1d95d21

Please sign in to comment.