{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/comments/29106338","id":29106338,"diff_hunk":"@@ -0,0 +1,38 @@\n+/*\n+ *  Copyright (c) 2015, Facebook, Inc.\n+ *  All rights reserved.\n+ *\n+ *  This source code is licensed under the BSD-style license found in the\n+ *  LICENSE file in the root directory of this source tree. An additional grant\n+ *  of patent rights can be found in the PATENTS file in the same directory.\n+ *\n+ */\n+\n+#import <FBSnapshotTestCase/FBSnapshotTestCaseArchitecture.h>\n+\n+NSString *const FBSnapshotTestArchitectureType32BitKey = @\"FBSnapshotTestArchitectureType32Bit\";\n+NSString *const FBSnapshotTestArchitectureType64BitKey = @\"FBSnapshotTestArchitectureType64Bit\";\n+\n+/// Returns true if the test is running in 64bit, otherwise returns NO.\n+NS_INLINE BOOL FBSnapshotTestIs64Bit(void)\n+{\n+#if __LP64__\n+  return YES;\n+#else\n+  return NO;\n+#endif\n+}\n+\n+NSOrderedSet* FBSuffixesForArchitectureTypes(NSDictionary *architectureTypes)\n+{\n+  NSCAssert(([architectureTypes objectForKey:FBSnapshotTestArchitectureType32BitKey] &&\n+             [architectureTypes objectForKey:FBSnapshotTestArchitectureType64BitKey]),\n+            @\"architectureTypes need to contain both keys.\");\n+  NSMutableOrderedSet *suffixesSet = [[NSMutableOrderedSet alloc] init];\n+  [suffixesSet addObject:architectureTypes[FBSnapshotTestArchitectureType32BitKey]];\n+  [suffixesSet addObject:architectureTypes[FBSnapshotTestArchitectureType64BitKey]];\n+  if (FBSnapshotTestIs64Bit()) {\n+    return [suffixesSet reversedOrderedSet];","path":"FBSnapshotTestCase/FBSnapshotTestCaseArchitecture.m","position":35,"original_position":35,"commit_id":"4b1532c0b88fe5dda28c1bc1958f058d7c95498f","original_commit_id":"4b1532c0b88fe5dda28c1bc1958f058d7c95498f","user":{"login":"nscoding","id":185995,"avatar_url":"https://avatars.githubusercontent.com/u/185995?v=3","gravatar_id":"","url":"https://api.github.com/users/nscoding","html_url":"https://github.com/nscoding","followers_url":"https://api.github.com/users/nscoding/followers","following_url":"https://api.github.com/users/nscoding/following{/other_user}","gists_url":"https://api.github.com/users/nscoding/gists{/gist_id}","starred_url":"https://api.github.com/users/nscoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nscoding/subscriptions","organizations_url":"https://api.github.com/users/nscoding/orgs","repos_url":"https://api.github.com/users/nscoding/repos","events_url":"https://api.github.com/users/nscoding/events{/privacy}","received_events_url":"https://api.github.com/users/nscoding/received_events","type":"User","site_admin":false},"body":"The order is 32bit first and 64bit afterwards, if the test is running in 64bit the order is reversed.","created_at":"2015-04-26T03:18:27Z","updated_at":"2015-04-26T03:18:27Z","html_url":"https://github.com/facebook/ios-snapshot-test-case/pull/77#discussion_r29106338","pull_request_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/77","_links":{"self":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/comments/29106338"},"html":{"href":"https://github.com/facebook/ios-snapshot-test-case/pull/77#discussion_r29106338"},"pull_request":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/77"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/77","id":34117114,"html_url":"https://github.com/facebook/ios-snapshot-test-case/pull/77","diff_url":"https://github.com/facebook/ios-snapshot-test-case/pull/77.diff","patch_url":"https://github.com/facebook/ios-snapshot-test-case/pull/77.patch","issue_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/77","number":77,"state":"open","locked":false,"title":"[draft] Support for 32bit and 64bit directory suffixes","user":{"login":"nscoding","id":185995,"avatar_url":"https://avatars.githubusercontent.com/u/185995?v=3","gravatar_id":"","url":"https://api.github.com/users/nscoding","html_url":"https://github.com/nscoding","followers_url":"https://api.github.com/users/nscoding/followers","following_url":"https://api.github.com/users/nscoding/following{/other_user}","gists_url":"https://api.github.com/users/nscoding/gists{/gist_id}","starred_url":"https://api.github.com/users/nscoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nscoding/subscriptions","organizations_url":"https://api.github.com/users/nscoding/orgs","repos_url":"https://api.github.com/users/nscoding/repos","events_url":"https://api.github.com/users/nscoding/events{/privacy}","received_events_url":"https://api.github.com/users/nscoding/received_events","type":"User","site_admin":false},"body":"I am putting this up for discussion, I am not sure about several things but please comment on anything you feel like.\r\n\r\nRight now, given the suffix approach we can separate 32bit and 64bit into different folders. That's great but if there is no reference image for a test in the 64 bit directory, the test will fail. In this diff I am aiming to look for the image for the current architecture that is running and if the test fail, I will load the other architecture as well before failing.\r\n\r\nI am not sure about several things but I will comment in the code as well.","created_at":"2015-04-26T03:14:27Z","updated_at":"2015-04-26T03:18:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"260711057a0e6470b1e2a58805365727da5dc444","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/77/commits","review_comments_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/77/comments","review_comment_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/77/comments","statuses_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/statuses/4b1532c0b88fe5dda28c1bc1958f058d7c95498f","head":{"label":"nscoding:nscoding/bits","ref":"nscoding/bits","sha":"4b1532c0b88fe5dda28c1bc1958f058d7c95498f","user":{"login":"nscoding","id":185995,"avatar_url":"https://avatars.githubusercontent.com/u/185995?v=3","gravatar_id":"","url":"https://api.github.com/users/nscoding","html_url":"https://github.com/nscoding","followers_url":"https://api.github.com/users/nscoding/followers","following_url":"https://api.github.com/users/nscoding/following{/other_user}","gists_url":"https://api.github.com/users/nscoding/gists{/gist_id}","starred_url":"https://api.github.com/users/nscoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nscoding/subscriptions","organizations_url":"https://api.github.com/users/nscoding/orgs","repos_url":"https://api.github.com/users/nscoding/repos","events_url":"https://api.github.com/users/nscoding/events{/privacy}","received_events_url":"https://api.github.com/users/nscoding/received_events","type":"User","site_admin":false},"repo":{"id":33523334,"name":"ios-snapshot-test-case","full_name":"nscoding/ios-snapshot-test-case","owner":{"login":"nscoding","id":185995,"avatar_url":"https://avatars.githubusercontent.com/u/185995?v=3","gravatar_id":"","url":"https://api.github.com/users/nscoding","html_url":"https://github.com/nscoding","followers_url":"https://api.github.com/users/nscoding/followers","following_url":"https://api.github.com/users/nscoding/following{/other_user}","gists_url":"https://api.github.com/users/nscoding/gists{/gist_id}","starred_url":"https://api.github.com/users/nscoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nscoding/subscriptions","organizations_url":"https://api.github.com/users/nscoding/orgs","repos_url":"https://api.github.com/users/nscoding/repos","events_url":"https://api.github.com/users/nscoding/events{/privacy}","received_events_url":"https://api.github.com/users/nscoding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nscoding/ios-snapshot-test-case","description":"Snapshot view unit tests for iOS","fork":true,"url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case","forks_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/forks","keys_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/teams","hooks_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/hooks","issue_events_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/issues/events{/number}","events_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/events","assignees_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/assignees{/user}","branches_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/branches{/branch}","tags_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/tags","blobs_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/git/refs{/sha}","trees_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/statuses/{sha}","languages_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/languages","stargazers_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/stargazers","contributors_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/contributors","subscribers_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/subscribers","subscription_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/subscription","commits_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/commits{/sha}","git_commits_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/git/commits{/sha}","comments_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/comments{/number}","issue_comment_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/issues/comments{/number}","contents_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/contents/{+path}","compare_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/merges","archive_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/downloads","issues_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/issues{/number}","pulls_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/pulls{/number}","milestones_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/milestones{/number}","notifications_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/labels{/name}","releases_url":"https://api.github.com/repos/nscoding/ios-snapshot-test-case/releases{/id}","created_at":"2015-04-07T05:09:11Z","updated_at":"2015-04-26T03:00:44Z","pushed_at":"2015-04-26T03:10:43Z","git_url":"git://github.com/nscoding/ios-snapshot-test-case.git","ssh_url":"git@github.com:nscoding/ios-snapshot-test-case.git","clone_url":"https://github.com/nscoding/ios-snapshot-test-case.git","svn_url":"https://github.com/nscoding/ios-snapshot-test-case","homepage":null,"size":415,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"cf87e2017c3488ab4a15ff7c2e71e2bdf24caefd","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":13236289,"name":"ios-snapshot-test-case","full_name":"facebook/ios-snapshot-test-case","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/ios-snapshot-test-case","description":"Snapshot view unit tests for iOS","fork":false,"url":"https://api.github.com/repos/facebook/ios-snapshot-test-case","forks_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/forks","keys_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/teams","hooks_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/hooks","issue_events_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/events","assignees_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/tags","blobs_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/languages","stargazers_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/stargazers","contributors_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/contributors","subscribers_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/subscribers","subscription_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/subscription","commits_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/merges","archive_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/downloads","issues_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/labels{/name}","releases_url":"https://api.github.com/repos/facebook/ios-snapshot-test-case/releases{/id}","created_at":"2013-10-01T06:15:56Z","updated_at":"2015-04-26T01:28:17Z","pushed_at":"2015-04-26T03:14:27Z","git_url":"git://github.com/facebook/ios-snapshot-test-case.git","ssh_url":"git@github.com:facebook/ios-snapshot-test-case.git","clone_url":"https://github.com/facebook/ios-snapshot-test-case.git","svn_url":"https://github.com/facebook/ios-snapshot-test-case","homepage":null,"size":958,"stargazers_count":1202,"watchers_count":1202,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":89,"mirror_url":null,"open_issues_count":6,"forks":89,"open_issues":6,"watchers":1202,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/77"},"html":{"href":"https://github.com/facebook/ios-snapshot-test-case/pull/77"},"issue":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/77"},"comments":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/ios-snapshot-test-case/statuses/4b1532c0b88fe5dda28c1bc1958f058d7c95498f"}}}}