{"action":"created","issue":{"url":"https://api.github.com/repos/JoinColony/solcover/issues/20","repository_url":"https://api.github.com/repos/JoinColony/solcover","labels_url":"https://api.github.com/repos/JoinColony/solcover/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/JoinColony/solcover/issues/20/comments","events_url":"https://api.github.com/repos/JoinColony/solcover/issues/20/events","html_url":"https://github.com/JoinColony/solcover/issues/20","id":196967833,"number":20,"title":"cross-contract invoke, test result is not the same with truffle","user":{"login":"maiffany","id":5028491,"avatar_url":"https://avatars.githubusercontent.com/u/5028491?v=3","gravatar_id":"","url":"https://api.github.com/users/maiffany","html_url":"https://github.com/maiffany","followers_url":"https://api.github.com/users/maiffany/followers","following_url":"https://api.github.com/users/maiffany/following{/other_user}","gists_url":"https://api.github.com/users/maiffany/gists{/gist_id}","starred_url":"https://api.github.com/users/maiffany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maiffany/subscriptions","organizations_url":"https://api.github.com/users/maiffany/orgs","repos_url":"https://api.github.com/users/maiffany/repos","events_url":"https://api.github.com/users/maiffany/events{/privacy}","received_events_url":"https://api.github.com/users/maiffany/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-21T15:58:41Z","updated_at":"2016-12-21T16:18:48Z","closed_at":"2016-12-21T16:18:48Z","body":"Here I come again...\r\nI wanna try to test cross-contract invoking, Just like in java: `new class A` in `class B`.\r\nAnd I got the two contract.\r\n\r\n```\r\ncontract Add{\r\n  function sum(uint x, uint y) returns(uint){\r\n    return x+y;\r\n  }\r\n}\r\ncontract Sum{\r\n  function func(uint x, uint y) returns(uint){\r\n    Add add = new Add();\r\n    uint re = add.sum(x,y);\r\n    return re;\r\n  }\r\n}\r\n```\r\n\r\nBecause I call `Add` in `Sum`, so in the `Sum.sol` I have to include`Add` contract inside it.\r\n\r\nAnd now I test this contract in truffle with my own `ethereum` client, it works fine.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/5028491/21395038/f1aae692-c7d5-11e6-929a-51e82a4526de.png)\r\n\r\nBut with solcover, the result is so weired. \r\n\r\n```\r\ninstrumenting  ./../originalContracts/Add.sol\r\ninstrumenting  ./../originalContracts/Sum.sol\r\ncp: no such file or directory: ./../originalContracts/Migrations.sol\r\nrm: no such file or directory: ./allFiredEvents\r\nCompiling Add.sol...\r\nCompiling Sum.sol...\r\n\r\n\r\n  Contract: Sum\r\n    1) should return 5 when add 2 and 3\r\n    > No events were emitted\r\n\r\n  Contract: Add\r\n    ✓ should return 5 when add 2 and 3\r\n\r\n\r\n  1 passing (512ms)\r\n  1 failing\r\n\r\n  1) Contract: Sum should return 5 when add 2 and 3:\r\n     AssertionError: sum of 2 and 3 is 5: expected '9.1735649321334958107552852973512799782292704141468709142420585807991067901952e+76' to equal 5\r\n      at /Users/maiffany/testcoverage/test/sum.js:6:14\r\n      at process._tickDomainCallback (internal/process/next_tick.js:129:7)\r\n\r\n\r\n\r\nDone\r\n```\r\n\r\nMy test code is in here: https://github.com/maiffany/mytest/tree/master\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JoinColony/solcover/issues/comments/268564243","html_url":"https://github.com/JoinColony/solcover/issues/20#issuecomment-268564243","issue_url":"https://api.github.com/repos/JoinColony/solcover/issues/20","id":268564243,"user":{"login":"area","id":311812,"avatar_url":"https://avatars.githubusercontent.com/u/311812?v=3","gravatar_id":"","url":"https://api.github.com/users/area","html_url":"https://github.com/area","followers_url":"https://api.github.com/users/area/followers","following_url":"https://api.github.com/users/area/following{/other_user}","gists_url":"https://api.github.com/users/area/gists{/gist_id}","starred_url":"https://api.github.com/users/area/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/area/subscriptions","organizations_url":"https://api.github.com/users/area/orgs","repos_url":"https://api.github.com/users/area/repos","events_url":"https://api.github.com/users/area/events{/privacy}","received_events_url":"https://api.github.com/users/area/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T16:18:48Z","updated_at":"2016-12-21T16:18:48Z","body":"I'm sorry to say this is a problem with `testrpc`, not `solparse`. There's an [issue logged](https://github.com/ethereumjs/testrpc/issues/149) but no movement on it for quite some time. Given I can reproduce the error with an unpatched `testrpc`, I'm afraid I'm going to close this issue given it's a problem with a dependency that we can't really work around."}}
{"actor":{"display_login":"area"}}