{"action":"created","comment":{"url":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/comments/55768894","id":55768894,"diff_hunk":"@@ -0,0 +1,284 @@\n+package reflex;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertTrue;\n+\n+import java.util.Map;\n+\n+import org.antlr.runtime.ANTLRStringStream;\n+import org.antlr.runtime.CommonTokenStream;\n+import org.antlr.runtime.RecognitionException;\n+import org.antlr.runtime.tree.CommonTree;\n+import org.antlr.runtime.tree.CommonTreeNodeStream;\n+import org.apache.log4j.AppenderSkeleton;\n+import org.apache.log4j.Logger;\n+import org.apache.log4j.spi.LoggingEvent;\n+import org.junit.Test;\n+\n+import rapture.common.api.ScriptingApi;\n+import reflex.node.MatchNode;\n+import reflex.node.ReflexNode;\n+import reflex.util.InstrumentDebugger;\n+import reflex.value.ReflexValue;\n+import reflex.value.internal.ReflexNullValue;\n+\n+public class MatchTest {\n+\tprivate static Logger log = Logger.getLogger(MatchTest.class);\n+\n+\t@Test\n+\tpublic void happyPathMatch() throws RecognitionException {\n+\t\tString program = \"ident = 5;\\n\" + \"match ident do\\n\" + \"is > 4 do\\n\" + \"println('Success');\\n\"\n+\t\t\t\t+ \"end\\n\" + \"is < 6 do\\n\" + \"println('Fail');\\n\" + \"end\\n\" + \"otherwise do\\n\" + \"println('Fail');\\n\"\n+\t\t\t\t+ \"end\\n\" + \"end\";\n+\n+\t\tString output = runScript(program, null);\n+\t\tassertEquals(\"Success\", output);\n+\t}\n+\t\n+\t@Test\n+\tpublic void testAsClause() throws RecognitionException {","path":"Libs/Reflex/src/test/java/reflex/MatchTest.java","position":39,"original_position":39,"commit_id":"cd499b4ed0d5df42ea677d1fa81b93cc701368c3","original_commit_id":"cd499b4ed0d5df42ea677d1fa81b93cc701368c3","user":{"login":"amkimian","id":40346,"avatar_url":"https://avatars.githubusercontent.com/u/40346?v=3","gravatar_id":"","url":"https://api.github.com/users/amkimian","html_url":"https://github.com/amkimian","followers_url":"https://api.github.com/users/amkimian/followers","following_url":"https://api.github.com/users/amkimian/following{/other_user}","gists_url":"https://api.github.com/users/amkimian/gists{/gist_id}","starred_url":"https://api.github.com/users/amkimian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amkimian/subscriptions","organizations_url":"https://api.github.com/users/amkimian/orgs","repos_url":"https://api.github.com/users/amkimian/repos","events_url":"https://api.github.com/users/amkimian/events{/privacy}","received_events_url":"https://api.github.com/users/amkimian/received_events","type":"User","site_admin":false},"body":"There's a better way of writing these tests, where the program is in the resources and you refer to them from that... (see most of the other tests!!!)","created_at":"2016-03-10T23:40:31Z","updated_at":"2016-03-10T23:40:31Z","html_url":"https://github.com/RapturePlatform/Rapture/pull/21#discussion_r55768894","pull_request_url":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/comments/55768894"},"html":{"href":"https://github.com/RapturePlatform/Rapture/pull/21#discussion_r55768894"},"pull_request":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/21","id":62440485,"html_url":"https://github.com/RapturePlatform/Rapture/pull/21","diff_url":"https://github.com/RapturePlatform/Rapture/pull/21.diff","patch_url":"https://github.com/RapturePlatform/Rapture/pull/21.patch","issue_url":"https://api.github.com/repos/RapturePlatform/Rapture/issues/21","number":21,"state":"open","locked":false,"title":"RAP-3969, RAP-3991","user":{"login":"scarabus","id":5854063,"avatar_url":"https://avatars.githubusercontent.com/u/5854063?v=3","gravatar_id":"","url":"https://api.github.com/users/scarabus","html_url":"https://github.com/scarabus","followers_url":"https://api.github.com/users/scarabus/followers","following_url":"https://api.github.com/users/scarabus/following{/other_user}","gists_url":"https://api.github.com/users/scarabus/gists{/gist_id}","starred_url":"https://api.github.com/users/scarabus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scarabus/subscriptions","organizations_url":"https://api.github.com/users/scarabus/orgs","repos_url":"https://api.github.com/users/scarabus/repos","events_url":"https://api.github.com/users/scarabus/events{/privacy}","received_events_url":"https://api.github.com/users/scarabus/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-10T19:15:31Z","updated_at":"2016-03-10T23:40:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f5736a5653797df4b07ca81b10ed90d432865da","assignee":{"login":"amkimian","id":40346,"avatar_url":"https://avatars.githubusercontent.com/u/40346?v=3","gravatar_id":"","url":"https://api.github.com/users/amkimian","html_url":"https://github.com/amkimian","followers_url":"https://api.github.com/users/amkimian/followers","following_url":"https://api.github.com/users/amkimian/following{/other_user}","gists_url":"https://api.github.com/users/amkimian/gists{/gist_id}","starred_url":"https://api.github.com/users/amkimian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amkimian/subscriptions","organizations_url":"https://api.github.com/users/amkimian/orgs","repos_url":"https://api.github.com/users/amkimian/repos","events_url":"https://api.github.com/users/amkimian/events{/privacy}","received_events_url":"https://api.github.com/users/amkimian/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/21/commits","review_comments_url":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/21/comments","review_comment_url":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RapturePlatform/Rapture/issues/21/comments","statuses_url":"https://api.github.com/repos/RapturePlatform/Rapture/statuses/cd499b4ed0d5df42ea677d1fa81b93cc701368c3","head":{"label":"scarabus:Switch","ref":"Switch","sha":"cd499b4ed0d5df42ea677d1fa81b93cc701368c3","user":{"login":"scarabus","id":5854063,"avatar_url":"https://avatars.githubusercontent.com/u/5854063?v=3","gravatar_id":"","url":"https://api.github.com/users/scarabus","html_url":"https://github.com/scarabus","followers_url":"https://api.github.com/users/scarabus/followers","following_url":"https://api.github.com/users/scarabus/following{/other_user}","gists_url":"https://api.github.com/users/scarabus/gists{/gist_id}","starred_url":"https://api.github.com/users/scarabus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scarabus/subscriptions","organizations_url":"https://api.github.com/users/scarabus/orgs","repos_url":"https://api.github.com/users/scarabus/repos","events_url":"https://api.github.com/users/scarabus/events{/privacy}","received_events_url":"https://api.github.com/users/scarabus/received_events","type":"User","site_admin":false},"repo":{"id":50383286,"name":"Rapture","full_name":"scarabus/Rapture","owner":{"login":"scarabus","id":5854063,"avatar_url":"https://avatars.githubusercontent.com/u/5854063?v=3","gravatar_id":"","url":"https://api.github.com/users/scarabus","html_url":"https://github.com/scarabus","followers_url":"https://api.github.com/users/scarabus/followers","following_url":"https://api.github.com/users/scarabus/following{/other_user}","gists_url":"https://api.github.com/users/scarabus/gists{/gist_id}","starred_url":"https://api.github.com/users/scarabus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scarabus/subscriptions","organizations_url":"https://api.github.com/users/scarabus/orgs","repos_url":"https://api.github.com/users/scarabus/repos","events_url":"https://api.github.com/users/scarabus/events{/privacy}","received_events_url":"https://api.github.com/users/scarabus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scarabus/Rapture","description":"","fork":true,"url":"https://api.github.com/repos/scarabus/Rapture","forks_url":"https://api.github.com/repos/scarabus/Rapture/forks","keys_url":"https://api.github.com/repos/scarabus/Rapture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scarabus/Rapture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scarabus/Rapture/teams","hooks_url":"https://api.github.com/repos/scarabus/Rapture/hooks","issue_events_url":"https://api.github.com/repos/scarabus/Rapture/issues/events{/number}","events_url":"https://api.github.com/repos/scarabus/Rapture/events","assignees_url":"https://api.github.com/repos/scarabus/Rapture/assignees{/user}","branches_url":"https://api.github.com/repos/scarabus/Rapture/branches{/branch}","tags_url":"https://api.github.com/repos/scarabus/Rapture/tags","blobs_url":"https://api.github.com/repos/scarabus/Rapture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scarabus/Rapture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scarabus/Rapture/git/refs{/sha}","trees_url":"https://api.github.com/repos/scarabus/Rapture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scarabus/Rapture/statuses/{sha}","languages_url":"https://api.github.com/repos/scarabus/Rapture/languages","stargazers_url":"https://api.github.com/repos/scarabus/Rapture/stargazers","contributors_url":"https://api.github.com/repos/scarabus/Rapture/contributors","subscribers_url":"https://api.github.com/repos/scarabus/Rapture/subscribers","subscription_url":"https://api.github.com/repos/scarabus/Rapture/subscription","commits_url":"https://api.github.com/repos/scarabus/Rapture/commits{/sha}","git_commits_url":"https://api.github.com/repos/scarabus/Rapture/git/commits{/sha}","comments_url":"https://api.github.com/repos/scarabus/Rapture/comments{/number}","issue_comment_url":"https://api.github.com/repos/scarabus/Rapture/issues/comments{/number}","contents_url":"https://api.github.com/repos/scarabus/Rapture/contents/{+path}","compare_url":"https://api.github.com/repos/scarabus/Rapture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scarabus/Rapture/merges","archive_url":"https://api.github.com/repos/scarabus/Rapture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scarabus/Rapture/downloads","issues_url":"https://api.github.com/repos/scarabus/Rapture/issues{/number}","pulls_url":"https://api.github.com/repos/scarabus/Rapture/pulls{/number}","milestones_url":"https://api.github.com/repos/scarabus/Rapture/milestones{/number}","notifications_url":"https://api.github.com/repos/scarabus/Rapture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scarabus/Rapture/labels{/name}","releases_url":"https://api.github.com/repos/scarabus/Rapture/releases{/id}","deployments_url":"https://api.github.com/repos/scarabus/Rapture/deployments","created_at":"2016-01-25T21:47:08Z","updated_at":"2016-01-25T21:47:13Z","pushed_at":"2016-03-10T22:32:36Z","git_url":"git://github.com/scarabus/Rapture.git","ssh_url":"git@github.com:scarabus/Rapture.git","clone_url":"https://github.com/scarabus/Rapture.git","svn_url":"https://github.com/scarabus/Rapture","homepage":null,"size":5702,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"master"}},"base":{"label":"RapturePlatform:master","ref":"master","sha":"7f9301eddc580b2555a8e0ff11aa61ca18715c94","user":{"login":"RapturePlatform","id":16673657,"avatar_url":"https://avatars.githubusercontent.com/u/16673657?v=3","gravatar_id":"","url":"https://api.github.com/users/RapturePlatform","html_url":"https://github.com/RapturePlatform","followers_url":"https://api.github.com/users/RapturePlatform/followers","following_url":"https://api.github.com/users/RapturePlatform/following{/other_user}","gists_url":"https://api.github.com/users/RapturePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/RapturePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RapturePlatform/subscriptions","organizations_url":"https://api.github.com/users/RapturePlatform/orgs","repos_url":"https://api.github.com/users/RapturePlatform/repos","events_url":"https://api.github.com/users/RapturePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/RapturePlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":49231518,"name":"Rapture","full_name":"RapturePlatform/Rapture","owner":{"login":"RapturePlatform","id":16673657,"avatar_url":"https://avatars.githubusercontent.com/u/16673657?v=3","gravatar_id":"","url":"https://api.github.com/users/RapturePlatform","html_url":"https://github.com/RapturePlatform","followers_url":"https://api.github.com/users/RapturePlatform/followers","following_url":"https://api.github.com/users/RapturePlatform/following{/other_user}","gists_url":"https://api.github.com/users/RapturePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/RapturePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RapturePlatform/subscriptions","organizations_url":"https://api.github.com/users/RapturePlatform/orgs","repos_url":"https://api.github.com/users/RapturePlatform/repos","events_url":"https://api.github.com/users/RapturePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/RapturePlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RapturePlatform/Rapture","description":"","fork":false,"url":"https://api.github.com/repos/RapturePlatform/Rapture","forks_url":"https://api.github.com/repos/RapturePlatform/Rapture/forks","keys_url":"https://api.github.com/repos/RapturePlatform/Rapture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RapturePlatform/Rapture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RapturePlatform/Rapture/teams","hooks_url":"https://api.github.com/repos/RapturePlatform/Rapture/hooks","issue_events_url":"https://api.github.com/repos/RapturePlatform/Rapture/issues/events{/number}","events_url":"https://api.github.com/repos/RapturePlatform/Rapture/events","assignees_url":"https://api.github.com/repos/RapturePlatform/Rapture/assignees{/user}","branches_url":"https://api.github.com/repos/RapturePlatform/Rapture/branches{/branch}","tags_url":"https://api.github.com/repos/RapturePlatform/Rapture/tags","blobs_url":"https://api.github.com/repos/RapturePlatform/Rapture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RapturePlatform/Rapture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RapturePlatform/Rapture/git/refs{/sha}","trees_url":"https://api.github.com/repos/RapturePlatform/Rapture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RapturePlatform/Rapture/statuses/{sha}","languages_url":"https://api.github.com/repos/RapturePlatform/Rapture/languages","stargazers_url":"https://api.github.com/repos/RapturePlatform/Rapture/stargazers","contributors_url":"https://api.github.com/repos/RapturePlatform/Rapture/contributors","subscribers_url":"https://api.github.com/repos/RapturePlatform/Rapture/subscribers","subscription_url":"https://api.github.com/repos/RapturePlatform/Rapture/subscription","commits_url":"https://api.github.com/repos/RapturePlatform/Rapture/commits{/sha}","git_commits_url":"https://api.github.com/repos/RapturePlatform/Rapture/git/commits{/sha}","comments_url":"https://api.github.com/repos/RapturePlatform/Rapture/comments{/number}","issue_comment_url":"https://api.github.com/repos/RapturePlatform/Rapture/issues/comments{/number}","contents_url":"https://api.github.com/repos/RapturePlatform/Rapture/contents/{+path}","compare_url":"https://api.github.com/repos/RapturePlatform/Rapture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RapturePlatform/Rapture/merges","archive_url":"https://api.github.com/repos/RapturePlatform/Rapture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RapturePlatform/Rapture/downloads","issues_url":"https://api.github.com/repos/RapturePlatform/Rapture/issues{/number}","pulls_url":"https://api.github.com/repos/RapturePlatform/Rapture/pulls{/number}","milestones_url":"https://api.github.com/repos/RapturePlatform/Rapture/milestones{/number}","notifications_url":"https://api.github.com/repos/RapturePlatform/Rapture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RapturePlatform/Rapture/labels{/name}","releases_url":"https://api.github.com/repos/RapturePlatform/Rapture/releases{/id}","deployments_url":"https://api.github.com/repos/RapturePlatform/Rapture/deployments","created_at":"2016-01-07T21:22:24Z","updated_at":"2016-01-12T20:29:26Z","pushed_at":"2016-03-10T22:32:37Z","git_url":"git://github.com/RapturePlatform/Rapture.git","ssh_url":"git@github.com:RapturePlatform/Rapture.git","clone_url":"https://github.com/RapturePlatform/Rapture.git","svn_url":"https://github.com/RapturePlatform/Rapture","homepage":null,"size":5682,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/21"},"html":{"href":"https://github.com/RapturePlatform/Rapture/pull/21"},"issue":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/issues/21"},"comments":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/RapturePlatform/Rapture/statuses/cd499b4ed0d5df42ea677d1fa81b93cc701368c3"}}}}