{"action":"created","comment":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments/87738327","pull_request_review_id":8337684,"id":87738327,"diff_hunk":"@@ -2244,6 +2248,366 @@ - (void)optionalFormButtonTapped:(id)sender {\n     [self beginTaskWithIdentifier:OptionalFormTaskIdentifier];\n }\n \n+#pragma mark - Predicate Tests\n+/*\n+ This is intended to test the predicate functions and APIs\n+ */\n+- (id<ORKTask>)makePredicateTestsTask {\n+    NSMutableArray *steps = [NSMutableArray new];\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"intro_step\"];\n+        step.title = @\"Predicate Tests\";\n+        [steps addObject:step];\n+    }\n+    \n+    // Test Expected Boolean value\n+    {\n+        ORKQuestionStep *step = [ORKQuestionStep questionStepWithIdentifier:@\"question_01\"\n+                                                                      title:@\"Choose Yes to pass this question, or No to Fail it\"\n+                                                                     answer:[ORKAnswerFormat booleanAnswerFormat]];\n+        step.optional = NO;\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_01_fail\"];\n+        step.title = @\"You failed the Boolean question.\";\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_01_pass\"];\n+        step.title = @\"You passed the Boolean question.\";\n+        [steps addObject:step];\n+    }\n+    \n+    // Test expected Single Choice\n+    {\n+        ORKAnswerFormat *answer = [ORKAnswerFormat choiceAnswerFormatWithStyle:ORKChoiceAnswerStyleSingleChoice textChoices:[NSArray arrayWithObjects:@\"Choose Yes\",@\"Choose No\", nil]];\n+        ORKQuestionStep *step = [ORKQuestionStep questionStepWithIdentifier:@\"question_02\"\n+                                                                      title:@\"This is a single-choice question.\"\n+                                                                     answer:answer];\n+        step.optional = NO;\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_02_fail\"];\n+        step.title = @\"You failed the single choice question.\";\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_02_pass\"];\n+        step.title = @\"You passed the single choice question.\";\n+        [steps addObject:step];\n+    }\n+    \n+    //  Test expected multiple choices\n+    {\n+        ORKAnswerFormat *answer = [ORKAnswerFormat choiceAnswerFormatWithStyle:ORKChoiceAnswerStyleMultipleChoice textChoices:[NSArray arrayWithObjects:@\"Cat\",@\"Dog\", @\"Rock\", nil]];\n+        ORKQuestionStep *step = [ORKQuestionStep questionStepWithIdentifier:@\"question_03\"\n+                                                                      title:@\"Choose the animals?\"\n+                                                                     answer:answer];\n+        step.optional = NO;\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_03_fail\"];\n+        step.title = @\"You failed the multiple choice animals question.\";\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_03_pass\"];\n+        step.title = @\"You passed the multiple choice animals question.\";\n+        [steps addObject:step];\n+    }\n+\n+    //  Test expected multiple choices\n+    {\n+        ORKAnswerFormat *answer = [ORKAnswerFormat choiceAnswerFormatWithStyle:ORKChoiceAnswerStyleSingleChoice textChoices:[NSArray arrayWithObjects:@\"Cat\",@\"Catheter\", @\"Cathedral\",@\"Dog\", nil]];\n+        ORKQuestionStep *step = [ORKQuestionStep questionStepWithIdentifier:@\"question_04\"\n+                                                                      title:@\"Which words contain the word 'Cat'?\"\n+                                                                     answer:answer];\n+        step.optional = NO;\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_04_fail\"];\n+        step.title = @\"You failed the pattern match cat question.\";\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_04_pass\"];\n+        step.title = @\"You passed the pattern match cat question.\";\n+        [steps addObject:step];\n+    }\n+\n+    //  Test expected text\n+    {\n+        ORKAnswerFormat *answer = [ORKAnswerFormat textAnswerFormat];\n+        ORKQuestionStep *step = [ORKQuestionStep questionStepWithIdentifier:@\"question_05\"\n+                                                                      title:@\"Write the word 'Dog'\"\n+                                                                     answer:answer];\n+        step.optional = NO;\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_05_fail\"];\n+        step.title = @\"You didn't write 'Dog'.\";\n+        [steps addObject:step];\n+    }\n+    \n+    {\n+        ORKInstructionStep *step = [[ORKInstructionStep alloc] initWithIdentifier:@\"question_05_pass\"];\n+        step.title = @\"You wrote Dog.\";","path":"Testing/ORKTest/ORKTest/MainViewController.m","position":147,"original_position":147,"commit_id":"1aa39859e90e46e2acb631b6fdaac409f8766b0a","original_commit_id":"1aa39859e90e46e2acb631b6fdaac409f8766b0a","user":{"login":"rsanchezsaez","id":444313,"avatar_url":"https://avatars.githubusercontent.com/u/444313?v=3","gravatar_id":"","url":"https://api.github.com/users/rsanchezsaez","html_url":"https://github.com/rsanchezsaez","followers_url":"https://api.github.com/users/rsanchezsaez/followers","following_url":"https://api.github.com/users/rsanchezsaez/following{/other_user}","gists_url":"https://api.github.com/users/rsanchezsaez/gists{/gist_id}","starred_url":"https://api.github.com/users/rsanchezsaez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsanchezsaez/subscriptions","organizations_url":"https://api.github.com/users/rsanchezsaez/orgs","repos_url":"https://api.github.com/users/rsanchezsaez/repos","events_url":"https://api.github.com/users/rsanchezsaez/events{/privacy}","received_events_url":"https://api.github.com/users/rsanchezsaez/received_events","type":"User","site_admin":false},"body":"I'd rewrite to: `@\"You wrote 'Dog'.\"` for consistency.","created_at":"2016-11-14T04:54:56Z","updated_at":"2016-11-14T04:54:56Z","html_url":"https://github.com/ResearchKit/ResearchKit/pull/763#discussion_r87738327","pull_request_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/763","_links":{"self":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments/87738327"},"html":{"href":"https://github.com/ResearchKit/ResearchKit/pull/763#discussion_r87738327"},"pull_request":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/763"}}},"pull_request":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/763","id":77725919,"html_url":"https://github.com/ResearchKit/ResearchKit/pull/763","diff_url":"https://github.com/ResearchKit/ResearchKit/pull/763.diff","patch_url":"https://github.com/ResearchKit/ResearchKit/pull/763.patch","issue_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/763","number":763,"state":"open","locked":false,"title":"PredicateTests","user":{"login":"md0u80c9","id":3925834,"avatar_url":"https://avatars.githubusercontent.com/u/3925834?v=3","gravatar_id":"","url":"https://api.github.com/users/md0u80c9","html_url":"https://github.com/md0u80c9","followers_url":"https://api.github.com/users/md0u80c9/followers","following_url":"https://api.github.com/users/md0u80c9/following{/other_user}","gists_url":"https://api.github.com/users/md0u80c9/gists{/gist_id}","starred_url":"https://api.github.com/users/md0u80c9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/md0u80c9/subscriptions","organizations_url":"https://api.github.com/users/md0u80c9/orgs","repos_url":"https://api.github.com/users/md0u80c9/repos","events_url":"https://api.github.com/users/md0u80c9/events{/privacy}","received_events_url":"https://api.github.com/users/md0u80c9/received_events","type":"User","site_admin":false},"body":"NB predicate tests which use 'match' don't seem to be working as expected in these tests. In the choice match test we try to match against Cat*; but only an exact match for Cat seems to pass the test.\n\nTest 7 - to check a text string for a match *og causes a SigAbt. This may be that the match strings are incorrect for these tests, or it may be an issue with the match predicate functions.\n#760\n","created_at":"2016-07-17T03:55:54Z","updated_at":"2016-11-14T04:54:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e891d93a35530253ea3f3c60f7d12642860090d4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/763/commits","review_comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/763/comments","review_comment_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/763/comments","statuses_url":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/1aa39859e90e46e2acb631b6fdaac409f8766b0a","head":{"label":"md0u80c9:predicateTests","ref":"predicateTests","sha":"1aa39859e90e46e2acb631b6fdaac409f8766b0a","user":{"login":"md0u80c9","id":3925834,"avatar_url":"https://avatars.githubusercontent.com/u/3925834?v=3","gravatar_id":"","url":"https://api.github.com/users/md0u80c9","html_url":"https://github.com/md0u80c9","followers_url":"https://api.github.com/users/md0u80c9/followers","following_url":"https://api.github.com/users/md0u80c9/following{/other_user}","gists_url":"https://api.github.com/users/md0u80c9/gists{/gist_id}","starred_url":"https://api.github.com/users/md0u80c9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/md0u80c9/subscriptions","organizations_url":"https://api.github.com/users/md0u80c9/orgs","repos_url":"https://api.github.com/users/md0u80c9/repos","events_url":"https://api.github.com/users/md0u80c9/events{/privacy}","received_events_url":"https://api.github.com/users/md0u80c9/received_events","type":"User","site_admin":false},"repo":{"id":36440236,"name":"ResearchKit","full_name":"md0u80c9/ResearchKit","owner":{"login":"md0u80c9","id":3925834,"avatar_url":"https://avatars.githubusercontent.com/u/3925834?v=3","gravatar_id":"","url":"https://api.github.com/users/md0u80c9","html_url":"https://github.com/md0u80c9","followers_url":"https://api.github.com/users/md0u80c9/followers","following_url":"https://api.github.com/users/md0u80c9/following{/other_user}","gists_url":"https://api.github.com/users/md0u80c9/gists{/gist_id}","starred_url":"https://api.github.com/users/md0u80c9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/md0u80c9/subscriptions","organizations_url":"https://api.github.com/users/md0u80c9/orgs","repos_url":"https://api.github.com/users/md0u80c9/repos","events_url":"https://api.github.com/users/md0u80c9/events{/privacy}","received_events_url":"https://api.github.com/users/md0u80c9/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/md0u80c9/ResearchKit","description":"ResearchKit is an open source software framework that makes it easy to create apps for medical research or for other research projects.","fork":true,"url":"https://api.github.com/repos/md0u80c9/ResearchKit","forks_url":"https://api.github.com/repos/md0u80c9/ResearchKit/forks","keys_url":"https://api.github.com/repos/md0u80c9/ResearchKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/md0u80c9/ResearchKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/md0u80c9/ResearchKit/teams","hooks_url":"https://api.github.com/repos/md0u80c9/ResearchKit/hooks","issue_events_url":"https://api.github.com/repos/md0u80c9/ResearchKit/issues/events{/number}","events_url":"https://api.github.com/repos/md0u80c9/ResearchKit/events","assignees_url":"https://api.github.com/repos/md0u80c9/ResearchKit/assignees{/user}","branches_url":"https://api.github.com/repos/md0u80c9/ResearchKit/branches{/branch}","tags_url":"https://api.github.com/repos/md0u80c9/ResearchKit/tags","blobs_url":"https://api.github.com/repos/md0u80c9/ResearchKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/md0u80c9/ResearchKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/md0u80c9/ResearchKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/md0u80c9/ResearchKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/md0u80c9/ResearchKit/statuses/{sha}","languages_url":"https://api.github.com/repos/md0u80c9/ResearchKit/languages","stargazers_url":"https://api.github.com/repos/md0u80c9/ResearchKit/stargazers","contributors_url":"https://api.github.com/repos/md0u80c9/ResearchKit/contributors","subscribers_url":"https://api.github.com/repos/md0u80c9/ResearchKit/subscribers","subscription_url":"https://api.github.com/repos/md0u80c9/ResearchKit/subscription","commits_url":"https://api.github.com/repos/md0u80c9/ResearchKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/md0u80c9/ResearchKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/md0u80c9/ResearchKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/md0u80c9/ResearchKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/md0u80c9/ResearchKit/contents/{+path}","compare_url":"https://api.github.com/repos/md0u80c9/ResearchKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/md0u80c9/ResearchKit/merges","archive_url":"https://api.github.com/repos/md0u80c9/ResearchKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/md0u80c9/ResearchKit/downloads","issues_url":"https://api.github.com/repos/md0u80c9/ResearchKit/issues{/number}","pulls_url":"https://api.github.com/repos/md0u80c9/ResearchKit/pulls{/number}","milestones_url":"https://api.github.com/repos/md0u80c9/ResearchKit/milestones{/number}","notifications_url":"https://api.github.com/repos/md0u80c9/ResearchKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/md0u80c9/ResearchKit/labels{/name}","releases_url":"https://api.github.com/repos/md0u80c9/ResearchKit/releases{/id}","deployments_url":"https://api.github.com/repos/md0u80c9/ResearchKit/deployments","created_at":"2015-05-28T13:29:35Z","updated_at":"2016-03-11T12:45:46Z","pushed_at":"2016-11-12T22:09:04Z","git_url":"git://github.com/md0u80c9/ResearchKit.git","ssh_url":"git@github.com:md0u80c9/ResearchKit.git","clone_url":"https://github.com/md0u80c9/ResearchKit.git","svn_url":"https://github.com/md0u80c9/ResearchKit","homepage":"","size":26210,"stargazers_count":0,"watchers_count":0,"language":"Objective-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":"master"}},"base":{"label":"ResearchKit:master","ref":"master","sha":"d84944ac6ade385fbbda5dd59066ebc438108cf3","user":{"login":"ResearchKit","id":11183179,"avatar_url":"https://avatars.githubusercontent.com/u/11183179?v=3","gravatar_id":"","url":"https://api.github.com/users/ResearchKit","html_url":"https://github.com/ResearchKit","followers_url":"https://api.github.com/users/ResearchKit/followers","following_url":"https://api.github.com/users/ResearchKit/following{/other_user}","gists_url":"https://api.github.com/users/ResearchKit/gists{/gist_id}","starred_url":"https://api.github.com/users/ResearchKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ResearchKit/subscriptions","organizations_url":"https://api.github.com/users/ResearchKit/orgs","repos_url":"https://api.github.com/users/ResearchKit/repos","events_url":"https://api.github.com/users/ResearchKit/events{/privacy}","received_events_url":"https://api.github.com/users/ResearchKit/received_events","type":"Organization","site_admin":false},"repo":{"id":31979038,"name":"ResearchKit","full_name":"ResearchKit/ResearchKit","owner":{"login":"ResearchKit","id":11183179,"avatar_url":"https://avatars.githubusercontent.com/u/11183179?v=3","gravatar_id":"","url":"https://api.github.com/users/ResearchKit","html_url":"https://github.com/ResearchKit","followers_url":"https://api.github.com/users/ResearchKit/followers","following_url":"https://api.github.com/users/ResearchKit/following{/other_user}","gists_url":"https://api.github.com/users/ResearchKit/gists{/gist_id}","starred_url":"https://api.github.com/users/ResearchKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ResearchKit/subscriptions","organizations_url":"https://api.github.com/users/ResearchKit/orgs","repos_url":"https://api.github.com/users/ResearchKit/repos","events_url":"https://api.github.com/users/ResearchKit/events{/privacy}","received_events_url":"https://api.github.com/users/ResearchKit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ResearchKit/ResearchKit","description":"ResearchKit is an open source software framework that makes it easy to create apps for medical research or for other research projects.","fork":false,"url":"https://api.github.com/repos/ResearchKit/ResearchKit","forks_url":"https://api.github.com/repos/ResearchKit/ResearchKit/forks","keys_url":"https://api.github.com/repos/ResearchKit/ResearchKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ResearchKit/ResearchKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ResearchKit/ResearchKit/teams","hooks_url":"https://api.github.com/repos/ResearchKit/ResearchKit/hooks","issue_events_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/events{/number}","events_url":"https://api.github.com/repos/ResearchKit/ResearchKit/events","assignees_url":"https://api.github.com/repos/ResearchKit/ResearchKit/assignees{/user}","branches_url":"https://api.github.com/repos/ResearchKit/ResearchKit/branches{/branch}","tags_url":"https://api.github.com/repos/ResearchKit/ResearchKit/tags","blobs_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/{sha}","languages_url":"https://api.github.com/repos/ResearchKit/ResearchKit/languages","stargazers_url":"https://api.github.com/repos/ResearchKit/ResearchKit/stargazers","contributors_url":"https://api.github.com/repos/ResearchKit/ResearchKit/contributors","subscribers_url":"https://api.github.com/repos/ResearchKit/ResearchKit/subscribers","subscription_url":"https://api.github.com/repos/ResearchKit/ResearchKit/subscription","commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ResearchKit/ResearchKit/contents/{+path}","compare_url":"https://api.github.com/repos/ResearchKit/ResearchKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ResearchKit/ResearchKit/merges","archive_url":"https://api.github.com/repos/ResearchKit/ResearchKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ResearchKit/ResearchKit/downloads","issues_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues{/number}","pulls_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls{/number}","milestones_url":"https://api.github.com/repos/ResearchKit/ResearchKit/milestones{/number}","notifications_url":"https://api.github.com/repos/ResearchKit/ResearchKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ResearchKit/ResearchKit/labels{/name}","releases_url":"https://api.github.com/repos/ResearchKit/ResearchKit/releases{/id}","deployments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/deployments","created_at":"2015-03-10T20:05:32Z","updated_at":"2016-11-14T03:41:17Z","pushed_at":"2016-11-14T04:11:06Z","git_url":"git://github.com/ResearchKit/ResearchKit.git","ssh_url":"git@github.com:ResearchKit/ResearchKit.git","clone_url":"https://github.com/ResearchKit/ResearchKit.git","svn_url":"https://github.com/ResearchKit/ResearchKit","homepage":"","size":34119,"stargazers_count":4731,"watchers_count":4731,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":854,"mirror_url":null,"open_issues_count":151,"forks":854,"open_issues":151,"watchers":4731,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/763"},"html":{"href":"https://github.com/ResearchKit/ResearchKit/pull/763"},"issue":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/763"},"comments":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/763/comments"},"review_comments":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/763/comments"},"review_comment":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/763/commits"},"statuses":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/1aa39859e90e46e2acb631b6fdaac409f8766b0a"}}}}
{"actor":{"display_login":"rsanchezsaez"}}