{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/comments/73548205","id":73548205,"diff_hunk":"@@ -6853,6 +6853,40 @@ BOOST_AUTO_TEST_CASE(create_dynamic_array_with_zero_length)\n \tBOOST_CHECK(callContractFunction(\"f()\") == encodeArgs(u256(7)));\n }\n \n+BOOST_AUTO_TEST_CASE(shift_left)\n+{\n+\tchar const* sourceCode = R\"(\n+\t\tcontract C {\n+\t\t\tfunction f(uint a, uint b) returns (uint) {\n+\t\t\t\treturn a << b;\n+\t\t\t}\n+\t\t}\n+\t)\";\n+\tcompileAndRun(sourceCode, 0, \"C\");\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0)) == encodeArgs(u256(0x4266)));\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0x8)) == encodeArgs(u256(0x426600)));\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0x16)) == encodeArgs(u256(0x42660000)));\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0x17)) == encodeArgs(u256(0x84cc0000)));\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0x240)) == fromHex(\"42660000000000000000000000000000000000000000000000000000000000000\"));\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0x256)) == encodeArgs(u256(0)));\n+}\n+\n+BOOST_AUTO_TEST_CASE(shift_right)\n+{\n+\tchar const* sourceCode = R\"(\n+\t\tcontract C {\n+\t\t\tfunction f(uint a, uint b) returns (uint) {\n+\t\t\t\treturn a >> b;\n+\t\t\t}\n+\t\t}\n+\t)\";\n+\tcompileAndRun(sourceCode, 0, \"C\");\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0)) == encodeArgs(u256(0x4266)));\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0x8)) == encodeArgs(u256(0x42)));\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0x16)) == encodeArgs(u256(0)));\n+\tBOOST_CHECK(callContractFunction(\"f(uint256,uint256)\", u256(0x4266), u256(0x17)) == encodeArgs(u256(0)));\n+}\n+","path":"test/libsolidity/SolidityEndToEndTest.cpp","position":37,"original_position":37,"commit_id":"12ec56c9813ee3a1da1384d033ca4e8cb16a51c1","original_commit_id":"12ec56c9813ee3a1da1384d033ca4e8cb16a51c1","user":{"login":"chriseth","id":9073706,"avatar_url":"https://avatars.githubusercontent.com/u/9073706?v=3","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"body":"Please also add tests for:\r\n\r\n - smaller types\r\n - checks that high order bit cleanup is performed correctly","created_at":"2016-08-04T15:45:30Z","updated_at":"2016-08-04T15:45:30Z","html_url":"https://github.com/ethereum/solidity/pull/527#discussion_r73548205","pull_request_url":"https://api.github.com/repos/ethereum/solidity/pulls/527","_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments/73548205"},"html":{"href":"https://github.com/ethereum/solidity/pull/527#discussion_r73548205"},"pull_request":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/527"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/527","id":68455461,"html_url":"https://github.com/ethereum/solidity/pull/527","diff_url":"https://github.com/ethereum/solidity/pull/527.diff","patch_url":"https://github.com/ethereum/solidity/pull/527.patch","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/527","number":527,"state":"open","locked":false,"title":"Support shift operators (SHL/SHR/SAR) [WIP]","user":{"login":"axic","id":20340,"avatar_url":"https://avatars.githubusercontent.com/u/20340?v=3","gravatar_id":"","url":"https://api.github.com/users/axic","html_url":"https://github.com/axic","followers_url":"https://api.github.com/users/axic/followers","following_url":"https://api.github.com/users/axic/following{/other_user}","gists_url":"https://api.github.com/users/axic/gists{/gist_id}","starred_url":"https://api.github.com/users/axic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axic/subscriptions","organizations_url":"https://api.github.com/users/axic/orgs","repos_url":"https://api.github.com/users/axic/repos","events_url":"https://api.github.com/users/axic/events{/privacy}","received_events_url":"https://api.github.com/users/axic/received_events","type":"User","site_admin":false},"body":"Do not merge yet - I would like to get feedback before finishing this work. Also some commits should be squashed later.\r\n\r\nFirst two commits could be merged as those are only trivial fixes.\r\n\r\nRegarding this rest:\r\n- SHL seems solid\r\n- SAR/SHR needs further testing (and not failing tests) and validation\r\n- the tests need to be extended and perhaps it shouldn't be in the end-to-end test\r\n\r\n(Fixes https://github.com/ethereum/solidity/issues/33.)","created_at":"2016-04-30T02:44:52Z","updated_at":"2016-08-04T15:45:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f61ded9d9eb223a88b390e88c1cd52f24a2e1628","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/solidity/pulls/527/commits","review_comments_url":"https://api.github.com/repos/ethereum/solidity/pulls/527/comments","review_comment_url":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/527/comments","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/12ec56c9813ee3a1da1384d033ca4e8cb16a51c1","head":{"label":"axic:feature/shift-ops","ref":"feature/shift-ops","sha":"12ec56c9813ee3a1da1384d033ca4e8cb16a51c1","user":{"login":"axic","id":20340,"avatar_url":"https://avatars.githubusercontent.com/u/20340?v=3","gravatar_id":"","url":"https://api.github.com/users/axic","html_url":"https://github.com/axic","followers_url":"https://api.github.com/users/axic/followers","following_url":"https://api.github.com/users/axic/following{/other_user}","gists_url":"https://api.github.com/users/axic/gists{/gist_id}","starred_url":"https://api.github.com/users/axic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axic/subscriptions","organizations_url":"https://api.github.com/users/axic/orgs","repos_url":"https://api.github.com/users/axic/repos","events_url":"https://api.github.com/users/axic/events{/privacy}","received_events_url":"https://api.github.com/users/axic/received_events","type":"User","site_admin":false},"repo":{"id":46638839,"name":"solidity","full_name":"axic/solidity","owner":{"login":"axic","id":20340,"avatar_url":"https://avatars.githubusercontent.com/u/20340?v=3","gravatar_id":"","url":"https://api.github.com/users/axic","html_url":"https://github.com/axic","followers_url":"https://api.github.com/users/axic/followers","following_url":"https://api.github.com/users/axic/following{/other_user}","gists_url":"https://api.github.com/users/axic/gists{/gist_id}","starred_url":"https://api.github.com/users/axic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axic/subscriptions","organizations_url":"https://api.github.com/users/axic/orgs","repos_url":"https://api.github.com/users/axic/repos","events_url":"https://api.github.com/users/axic/events{/privacy}","received_events_url":"https://api.github.com/users/axic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/axic/solidity","description":"The Solidity Contract-Oriented Programming Language","fork":true,"url":"https://api.github.com/repos/axic/solidity","forks_url":"https://api.github.com/repos/axic/solidity/forks","keys_url":"https://api.github.com/repos/axic/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/axic/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/axic/solidity/teams","hooks_url":"https://api.github.com/repos/axic/solidity/hooks","issue_events_url":"https://api.github.com/repos/axic/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/axic/solidity/events","assignees_url":"https://api.github.com/repos/axic/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/axic/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/axic/solidity/tags","blobs_url":"https://api.github.com/repos/axic/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/axic/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/axic/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/axic/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/axic/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/axic/solidity/languages","stargazers_url":"https://api.github.com/repos/axic/solidity/stargazers","contributors_url":"https://api.github.com/repos/axic/solidity/contributors","subscribers_url":"https://api.github.com/repos/axic/solidity/subscribers","subscription_url":"https://api.github.com/repos/axic/solidity/subscription","commits_url":"https://api.github.com/repos/axic/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/axic/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/axic/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/axic/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/axic/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/axic/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/axic/solidity/merges","archive_url":"https://api.github.com/repos/axic/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/axic/solidity/downloads","issues_url":"https://api.github.com/repos/axic/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/axic/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/axic/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/axic/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/axic/solidity/labels{/name}","releases_url":"https://api.github.com/repos/axic/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/axic/solidity/deployments","created_at":"2015-11-21T23:45:55Z","updated_at":"2016-04-30T02:33:39Z","pushed_at":"2016-08-02T17:20:19Z","git_url":"git://github.com/axic/solidity.git","ssh_url":"git@github.com:axic/solidity.git","clone_url":"https://github.com/axic/solidity.git","svn_url":"https://github.com/axic/solidity","homepage":"","size":8792,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"b68ca9cd569e179c4209aaa2706bb962b7fc2fd0","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":40892817,"name":"solidity","full_name":"ethereum/solidity","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/solidity","description":"The Solidity Contract-Oriented Programming Language","fork":false,"url":"https://api.github.com/repos/ethereum/solidity","forks_url":"https://api.github.com/repos/ethereum/solidity/forks","keys_url":"https://api.github.com/repos/ethereum/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/solidity/teams","hooks_url":"https://api.github.com/repos/ethereum/solidity/hooks","issue_events_url":"https://api.github.com/repos/ethereum/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/solidity/events","assignees_url":"https://api.github.com/repos/ethereum/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/solidity/tags","blobs_url":"https://api.github.com/repos/ethereum/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/solidity/languages","stargazers_url":"https://api.github.com/repos/ethereum/solidity/stargazers","contributors_url":"https://api.github.com/repos/ethereum/solidity/contributors","subscribers_url":"https://api.github.com/repos/ethereum/solidity/subscribers","subscription_url":"https://api.github.com/repos/ethereum/solidity/subscription","commits_url":"https://api.github.com/repos/ethereum/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/solidity/merges","archive_url":"https://api.github.com/repos/ethereum/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/solidity/downloads","issues_url":"https://api.github.com/repos/ethereum/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/solidity/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/solidity/deployments","created_at":"2015-08-17T12:27:26Z","updated_at":"2016-08-03T07:02:28Z","pushed_at":"2016-08-04T14:37:44Z","git_url":"git://github.com/ethereum/solidity.git","ssh_url":"git@github.com:ethereum/solidity.git","clone_url":"https://github.com/ethereum/solidity.git","svn_url":"https://github.com/ethereum/solidity","homepage":"","size":11396,"stargazers_count":319,"watchers_count":319,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":161,"mirror_url":null,"open_issues_count":178,"forks":161,"open_issues":178,"watchers":319,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/527"},"html":{"href":"https://github.com/ethereum/solidity/pull/527"},"issue":{"href":"https://api.github.com/repos/ethereum/solidity/issues/527"},"comments":{"href":"https://api.github.com/repos/ethereum/solidity/issues/527/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/527/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/527/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/solidity/statuses/12ec56c9813ee3a1da1384d033ca4e8cb16a51c1"}}}}
{"actor":{"display_login":"chriseth"}}