diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-03-15 22:42:48 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-03-15 23:19:01 +0800 |
commit | f6c01520ae75d173937f0847ac45e636b06f4146 (patch) | |
tree | 6c16d0a8050bf470fd9a7e93c88b8f840b35b604 /packages/sol-cov/test/fixtures | |
parent | 40ebb533b324bf7dd454243fcb1ee092ab85f7eb (diff) | |
download | dexon-sol-tools-f6c01520ae75d173937f0847ac45e636b06f4146.tar dexon-sol-tools-f6c01520ae75d173937f0847ac45e636b06f4146.tar.gz dexon-sol-tools-f6c01520ae75d173937f0847ac45e636b06f4146.tar.bz2 dexon-sol-tools-f6c01520ae75d173937f0847ac45e636b06f4146.tar.lz dexon-sol-tools-f6c01520ae75d173937f0847ac45e636b06f4146.tar.xz dexon-sol-tools-f6c01520ae75d173937f0847ac45e636b06f4146.tar.zst dexon-sol-tools-f6c01520ae75d173937f0847ac45e636b06f4146.zip |
Add tests for sol-cov
Diffstat (limited to 'packages/sol-cov/test/fixtures')
4 files changed, 95 insertions, 0 deletions
diff --git a/packages/sol-cov/test/fixtures/artifacts/SimpleStorage.json b/packages/sol-cov/test/fixtures/artifacts/SimpleStorage.json new file mode 100644 index 000000000..416170ef2 --- /dev/null +++ b/packages/sol-cov/test/fixtures/artifacts/SimpleStorage.json @@ -0,0 +1,64 @@ +{ + "contract_name": "SimpleStorage", + "networks": { + "50": { + "solc_version": "0.4.21", + "keccak256": "0x18dc5b5a0e813c17e49936d2f2f7c07c51f050c09ba5e7206f17c855f23f4b6a", + "source_tree_hash": "0x18dc5b5a0e813c17e49936d2f2f7c07c51f050c09ba5e7206f17c855f23f4b6a", + "optimizer_enabled": 0, + "abi": [ + { + "constant": true, + "inputs": [], + "name": "storedData", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "x", + "type": "uint256" + } + ], + "name": "set", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "get", + "outputs": [ + { + "name": "retVal", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": + "0x6060604052341561000f57600080fd5b6101098061001e6000396000f3006060604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632a1afcd914605857806360fe47b114607e5780636d4ce63c14609e575b600080fd5b3415606257600080fd5b606860c4565b6040518082815260200191505060405180910390f35b3415608857600080fd5b609c600480803590602001909190505060ca565b005b341560a857600080fd5b60ae60d4565b6040518082815260200191505060405180910390f35b60005481565b8060008190555050565b600080549050905600a165627a7a723058207f743855fd0c71699620424a21a257cd197ed05032d6768eb9b874e4898f44c60029", + "runtime_bytecode": + "0x6060604052600436106053576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632a1afcd914605857806360fe47b114607e5780636d4ce63c14609e575b600080fd5b3415606257600080fd5b606860c4565b6040518082815260200191505060405180910390f35b3415608857600080fd5b609c600480803590602001909190505060ca565b005b341560a857600080fd5b60ae60d4565b6040518082815260200191505060405180910390f35b60005481565b8060008190555050565b600080549050905600a165627a7a723058207f743855fd0c71699620424a21a257cd197ed05032d6768eb9b874e4898f44c60029", + "updated_at": 1521118350895, + "source_map": "26:196:0:-;;;;;;;;;;;;;;;;;", + "source_map_runtime": + "26:196:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;83:52;;;;;;;;;;;;;;;;;;;;;;;;;;140:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55:22;;;;:::o;83:52::-;127:1;114:10;:14;;;;83:52;:::o;140:80::-;173:11;203:10;;196:17;;140:80;:::o", + "sources": ["SimpleStorage.sol"] + } + } +} diff --git a/packages/sol-cov/test/fixtures/artifacts/Simplest.json b/packages/sol-cov/test/fixtures/artifacts/Simplest.json new file mode 100644 index 000000000..8de60e481 --- /dev/null +++ b/packages/sol-cov/test/fixtures/artifacts/Simplest.json @@ -0,0 +1,20 @@ +{ + "contract_name": "Simplest", + "networks": { + "50": { + "solc_version": "0.4.21", + "keccak256": "0x8e7d62e19c7c7b8bf9a4a43749e111605950cc877574fb9640a1a07d1c3749f9", + "source_tree_hash": "0x8e7d62e19c7c7b8bf9a4a43749e111605950cc877574fb9640a1a07d1c3749f9", + "optimizer_enabled": 0, + "abi": [], + "bytecode": + "0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a7230582097cfe05b4d18d6ffb3a8d8fab0570cf09640d3131b9677ddb9be4e9fbcb65f010029", + "runtime_bytecode": + "0x6060604052600080fd00a165627a7a7230582097cfe05b4d18d6ffb3a8d8fab0570cf09640d3131b9677ddb9be4e9fbcb65f010029", + "updated_at": 1521118525393, + "source_map": "26:21:0:-;;;;;;;;;;;;;;;;;", + "source_map_runtime": "26:21:0:-;;;;;", + "sources": ["Simplest.sol"] + } + } +} diff --git a/packages/sol-cov/test/fixtures/contracts/SimpleStorage.sol b/packages/sol-cov/test/fixtures/contracts/SimpleStorage.sol new file mode 100644 index 000000000..178a52318 --- /dev/null +++ b/packages/sol-cov/test/fixtures/contracts/SimpleStorage.sol @@ -0,0 +1,9 @@ +contract SimpleStorage { + uint public storedData; + function set(uint x) { + storedData = x; + } + function get() constant returns (uint retVal) { + return storedData; + } +} diff --git a/packages/sol-cov/test/fixtures/contracts/Simplest.sol b/packages/sol-cov/test/fixtures/contracts/Simplest.sol new file mode 100644 index 000000000..d71016e07 --- /dev/null +++ b/packages/sol-cov/test/fixtures/contracts/Simplest.sol @@ -0,0 +1,2 @@ +contract Simplest { +} |