Skip to content

Commit

Permalink
Add parser and abi test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
zemse committed Aug 13, 2022
1 parent d649059 commit 48df82f
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/libsolidity/ABIJson/mapping.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
contract test {
mapping(address owner => mapping(address spender => uint value)) public allowance;
}
// ----
// :test
// [
// {
// "inputs": [
// {
// "internalType": "address",
// "name": "owner",
// "type": "address"
// },
// {
// "internalType": "address",
// "name": "spender",
// "type": "address"
// }
// ],
// "name": "allowance",
// "outputs": [
// {
// "internalType": "uint256",
// "name": "value",
// "type": "uint256"
// }
// ],
// "stateMutability": "view",
// "type": "function"
// }
// ]

4 changes: 4 additions & 0 deletions test/libsolidity/syntaxTests/parsing/mapping_with_names_1.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contract test {
mapping(address user => bytes32 ipfs) names;
}
// ----
4 changes: 4 additions & 0 deletions test/libsolidity/syntaxTests/parsing/mapping_with_names_2.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contract test {
mapping(address => bytes32 ipfs) names;
}
// ----
4 changes: 4 additions & 0 deletions test/libsolidity/syntaxTests/parsing/mapping_with_names_3.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contract test {
mapping(address user => bytes32) names;
}
// ----
4 changes: 4 additions & 0 deletions test/libsolidity/syntaxTests/parsing/mapping_with_names_4.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contract test {
mapping(address owner => mapping(address spender => bytes32 note)) names;
}
// ----
4 changes: 4 additions & 0 deletions test/libsolidity/syntaxTests/parsing/mapping_with_names_5.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contract test {
mapping(address owner => mapping(address spender => bytes32[] notes)) names;
}
// ----

0 comments on commit 48df82f

Please sign in to comment.