{"action":"created","comment":{"url":"https://api.github.com/repos/dn-m/Staff/pulls/comments/85614244","pull_request_review_id":6323313,"id":85614244,"diff_hunk":"@@ -13,13 +13,103 @@ import PitchSpellingTools\n \n class StaffEventTests: XCTestCase {\n \n-    func testInit() {\n-        let _ = StaffEvent()\n+    func testAmountLedgerLinesMiddleCTrebleClef() {\n+        let spelledPitch = SpelledPitch(Pitch.middleC, PitchSpelling(.c))\n+        let staffEvent = StaffEvent(\n+            staffSpaceHeight: 10,\n+            representablePitchCollection: StaffRepresentablePitchCollection(\n+                    [StaffRepresentablePitchContext(spelledPitch)!]\n+            )\n+        )\n+        XCTAssertEqual(staffEvent.amountLedgerLinesAbove, 0)\n+        XCTAssertEqual(staffEvent.amountLedgerLinesBelow, 1)\n     }\n     \n-    func testAddSpelledPitchWithNoteheadKind() {\n-        var staffEvent = StaffEvent()\n-        let spelledPitch = SpelledPitch(Pitch.middleC, PitchSpelling(.c))\n-        staffEvent.addSpelledPitch(spelledPitch, representedBy: .ord)\n+    func testAmountLedgerLinesCAboveMiddleCTrebleClef() {\n+        let spelledPitch = SpelledPitch(72, PitchSpelling(.c))\n+        let staffEvent = StaffEvent(\n+            staffSpaceHeight: 10,\n+            representablePitchCollection: StaffRepresentablePitchCollection(\n+                [StaffRepresentablePitchContext(spelledPitch)!]\n+            )\n+        )\n+        XCTAssertEqual(staffEvent.amountLedgerLinesAbove, 0)\n+        XCTAssertEqual(staffEvent.amountLedgerLinesBelow, 0)\n+    }\n+    \n+    func testAmountLedgerLinesCTowOctavesAboveMiddleCTrebleClef() {\n+        let spelledPitch = SpelledPitch(84, PitchSpelling(.c))\n+        let staffEvent = StaffEvent(\n+            staffSpaceHeight: 10,\n+            representablePitchCollection: StaffRepresentablePitchCollection(\n+                [StaffRepresentablePitchContext(spelledPitch)!]\n+            )\n+        )\n+        XCTAssertEqual(staffEvent.amountLedgerLinesAbove, 2)\n+        XCTAssertEqual(staffEvent.amountLedgerLinesBelow, 0)\n+    }\n+    \n+    func testAmountLedgerLinesBBelowMiddleC() {\n+        let spelledPitch = SpelledPitch(59, PitchSpelling(.b))\n+        let staffEvent = StaffEvent(\n+            staffSpaceHeight: 10,\n+            representablePitchCollection: StaffRepresentablePitchCollection(\n+                [StaffRepresentablePitchContext(spelledPitch)!]\n+            )\n+        )\n+        XCTAssertEqual(staffEvent.amountLedgerLinesAbove, 0)\n+        XCTAssertEqual(staffEvent.amountLedgerLinesBelow, 1)\n+    }\n+    \n+    func testAmountLedgerLinesEFlatTwoOctavesAboveMiddleC() {\n+        let spelledPitch = SpelledPitch(87, PitchSpelling(.e, .flat))\n+        let staffEvent = StaffEvent(\n+            staffSpaceHeight: 10,\n+            representablePitchCollection: StaffRepresentablePitchCollection(\n+                [StaffRepresentablePitchContext(spelledPitch)!]\n+            )\n+        )\n+        XCTAssertEqual(staffEvent.amountLedgerLinesAbove, 3)\n+        XCTAssertEqual(staffEvent.amountLedgerLinesBelow, 0)\n+    }\n+    \n+    func testAmountLedgerLinesGSharpBelowMiddleC() {\n+        let spelledPitch = SpelledPitch(56, PitchSpelling(.g, .sharp))\n+        let staffEvent = StaffEvent(\n+            staffSpaceHeight: 10,\n+            representablePitchCollection: StaffRepresentablePitchCollection(\n+                [StaffRepresentablePitchContext(spelledPitch)!]\n+            )\n+        )\n+        XCTAssertEqual(staffEvent.amountLedgerLinesAbove, 0)\n+        XCTAssertEqual(staffEvent.amountLedgerLinesBelow, 2)\n+    }\n+    \n+    func testAmountLedgerLinesWideDyad() {\n+        let gSharpHigh = SpelledPitch(92, PitchSpelling(.g, .sharp))\n+        let fLow = SpelledPitch(53, PitchSpelling(.f))\n+        let staffEvent = StaffEvent(\n+            staffSpaceHeight: 10,\n+            representablePitchCollection: StaffRepresentablePitchCollection(\n+                [\n+                    StaffRepresentablePitchContext(gSharpHigh)!,\n+                    StaffRepresentablePitchContext(fLow)!\n+                ]\n+            )\n+        )\n+        XCTAssertEqual(staffEvent.amountLedgerLinesAbove, 4)\n+        XCTAssertEqual(staffEvent.amountLedgerLinesBelow, 3)\n+    }\n+    ","path":"StaffTests/StaffEventTests.swift","position":97,"original_position":97,"commit_id":"8f252bf473a6a26db330ee6f4c5b421c8ba98b06","original_commit_id":"8f252bf473a6a26db330ee6f4c5b421c8ba98b06","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)","created_at":"2016-10-28T21:35:17Z","updated_at":"2016-10-28T21:35:17Z","html_url":"https://github.com/dn-m/Staff/pull/13#discussion_r85614244","pull_request_url":"https://api.github.com/repos/dn-m/Staff/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/dn-m/Staff/pulls/comments/85614244"},"html":{"href":"https://github.com/dn-m/Staff/pull/13#discussion_r85614244"},"pull_request":{"href":"https://api.github.com/repos/dn-m/Staff/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/dn-m/Staff/pulls/13","id":91456401,"html_url":"https://github.com/dn-m/Staff/pull/13","diff_url":"https://github.com/dn-m/Staff/pull/13.diff","patch_url":"https://github.com/dn-m/Staff/pull/13.patch","issue_url":"https://api.github.com/repos/dn-m/Staff/issues/13","number":13,"state":"open","locked":false,"title":"Update for Swift 3.0","user":{"login":"jsbean","id":7040073,"avatar_url":"https://avatars.githubusercontent.com/u/7040073?v=3","gravatar_id":"","url":"https://api.github.com/users/jsbean","html_url":"https://github.com/jsbean","followers_url":"https://api.github.com/users/jsbean/followers","following_url":"https://api.github.com/users/jsbean/following{/other_user}","gists_url":"https://api.github.com/users/jsbean/gists{/gist_id}","starred_url":"https://api.github.com/users/jsbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsbean/subscriptions","organizations_url":"https://api.github.com/users/jsbean/orgs","repos_url":"https://api.github.com/users/jsbean/repos","events_url":"https://api.github.com/users/jsbean/events{/privacy}","received_events_url":"https://api.github.com/users/jsbean/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-28T21:35:01Z","updated_at":"2016-10-28T21:35:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec7e38cee9ee1f0f6b144deb79b41d771ea6a11d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dn-m/Staff/pulls/13/commits","review_comments_url":"https://api.github.com/repos/dn-m/Staff/pulls/13/comments","review_comment_url":"https://api.github.com/repos/dn-m/Staff/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dn-m/Staff/issues/13/comments","statuses_url":"https://api.github.com/repos/dn-m/Staff/statuses/8f252bf473a6a26db330ee6f4c5b421c8ba98b06","head":{"label":"dn-m:swift3","ref":"swift3","sha":"8f252bf473a6a26db330ee6f4c5b421c8ba98b06","user":{"login":"dn-m","id":17167826,"avatar_url":"https://avatars.githubusercontent.com/u/17167826?v=3","gravatar_id":"","url":"https://api.github.com/users/dn-m","html_url":"https://github.com/dn-m","followers_url":"https://api.github.com/users/dn-m/followers","following_url":"https://api.github.com/users/dn-m/following{/other_user}","gists_url":"https://api.github.com/users/dn-m/gists{/gist_id}","starred_url":"https://api.github.com/users/dn-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dn-m/subscriptions","organizations_url":"https://api.github.com/users/dn-m/orgs","repos_url":"https://api.github.com/users/dn-m/repos","events_url":"https://api.github.com/users/dn-m/events{/privacy}","received_events_url":"https://api.github.com/users/dn-m/received_events","type":"Organization","site_admin":false},"repo":{"id":61132396,"name":"Staff","full_name":"dn-m/Staff","owner":{"login":"dn-m","id":17167826,"avatar_url":"https://avatars.githubusercontent.com/u/17167826?v=3","gravatar_id":"","url":"https://api.github.com/users/dn-m","html_url":"https://github.com/dn-m","followers_url":"https://api.github.com/users/dn-m/followers","following_url":"https://api.github.com/users/dn-m/following{/other_user}","gists_url":"https://api.github.com/users/dn-m/gists{/gist_id}","starred_url":"https://api.github.com/users/dn-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dn-m/subscriptions","organizations_url":"https://api.github.com/users/dn-m/orgs","repos_url":"https://api.github.com/users/dn-m/repos","events_url":"https://api.github.com/users/dn-m/events{/privacy}","received_events_url":"https://api.github.com/users/dn-m/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dn-m/Staff","description":"Musical staff","fork":false,"url":"https://api.github.com/repos/dn-m/Staff","forks_url":"https://api.github.com/repos/dn-m/Staff/forks","keys_url":"https://api.github.com/repos/dn-m/Staff/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dn-m/Staff/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dn-m/Staff/teams","hooks_url":"https://api.github.com/repos/dn-m/Staff/hooks","issue_events_url":"https://api.github.com/repos/dn-m/Staff/issues/events{/number}","events_url":"https://api.github.com/repos/dn-m/Staff/events","assignees_url":"https://api.github.com/repos/dn-m/Staff/assignees{/user}","branches_url":"https://api.github.com/repos/dn-m/Staff/branches{/branch}","tags_url":"https://api.github.com/repos/dn-m/Staff/tags","blobs_url":"https://api.github.com/repos/dn-m/Staff/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dn-m/Staff/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dn-m/Staff/git/refs{/sha}","trees_url":"https://api.github.com/repos/dn-m/Staff/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dn-m/Staff/statuses/{sha}","languages_url":"https://api.github.com/repos/dn-m/Staff/languages","stargazers_url":"https://api.github.com/repos/dn-m/Staff/stargazers","contributors_url":"https://api.github.com/repos/dn-m/Staff/contributors","subscribers_url":"https://api.github.com/repos/dn-m/Staff/subscribers","subscription_url":"https://api.github.com/repos/dn-m/Staff/subscription","commits_url":"https://api.github.com/repos/dn-m/Staff/commits{/sha}","git_commits_url":"https://api.github.com/repos/dn-m/Staff/git/commits{/sha}","comments_url":"https://api.github.com/repos/dn-m/Staff/comments{/number}","issue_comment_url":"https://api.github.com/repos/dn-m/Staff/issues/comments{/number}","contents_url":"https://api.github.com/repos/dn-m/Staff/contents/{+path}","compare_url":"https://api.github.com/repos/dn-m/Staff/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dn-m/Staff/merges","archive_url":"https://api.github.com/repos/dn-m/Staff/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dn-m/Staff/downloads","issues_url":"https://api.github.com/repos/dn-m/Staff/issues{/number}","pulls_url":"https://api.github.com/repos/dn-m/Staff/pulls{/number}","milestones_url":"https://api.github.com/repos/dn-m/Staff/milestones{/number}","notifications_url":"https://api.github.com/repos/dn-m/Staff/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dn-m/Staff/labels{/name}","releases_url":"https://api.github.com/repos/dn-m/Staff/releases{/id}","deployments_url":"https://api.github.com/repos/dn-m/Staff/deployments","created_at":"2016-06-14T15:03:44Z","updated_at":"2016-06-14T15:04:38Z","pushed_at":"2016-10-28T21:35:01Z","git_url":"git://github.com/dn-m/Staff.git","ssh_url":"git@github.com:dn-m/Staff.git","clone_url":"https://github.com/dn-m/Staff.git","svn_url":"https://github.com/dn-m/Staff","homepage":null,"size":541,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"dn-m:master","ref":"master","sha":"1cac839b83d370f8a9e5f2e8b4d33fcc4b4bc364","user":{"login":"dn-m","id":17167826,"avatar_url":"https://avatars.githubusercontent.com/u/17167826?v=3","gravatar_id":"","url":"https://api.github.com/users/dn-m","html_url":"https://github.com/dn-m","followers_url":"https://api.github.com/users/dn-m/followers","following_url":"https://api.github.com/users/dn-m/following{/other_user}","gists_url":"https://api.github.com/users/dn-m/gists{/gist_id}","starred_url":"https://api.github.com/users/dn-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dn-m/subscriptions","organizations_url":"https://api.github.com/users/dn-m/orgs","repos_url":"https://api.github.com/users/dn-m/repos","events_url":"https://api.github.com/users/dn-m/events{/privacy}","received_events_url":"https://api.github.com/users/dn-m/received_events","type":"Organization","site_admin":false},"repo":{"id":61132396,"name":"Staff","full_name":"dn-m/Staff","owner":{"login":"dn-m","id":17167826,"avatar_url":"https://avatars.githubusercontent.com/u/17167826?v=3","gravatar_id":"","url":"https://api.github.com/users/dn-m","html_url":"https://github.com/dn-m","followers_url":"https://api.github.com/users/dn-m/followers","following_url":"https://api.github.com/users/dn-m/following{/other_user}","gists_url":"https://api.github.com/users/dn-m/gists{/gist_id}","starred_url":"https://api.github.com/users/dn-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dn-m/subscriptions","organizations_url":"https://api.github.com/users/dn-m/orgs","repos_url":"https://api.github.com/users/dn-m/repos","events_url":"https://api.github.com/users/dn-m/events{/privacy}","received_events_url":"https://api.github.com/users/dn-m/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dn-m/Staff","description":"Musical staff","fork":false,"url":"https://api.github.com/repos/dn-m/Staff","forks_url":"https://api.github.com/repos/dn-m/Staff/forks","keys_url":"https://api.github.com/repos/dn-m/Staff/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dn-m/Staff/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dn-m/Staff/teams","hooks_url":"https://api.github.com/repos/dn-m/Staff/hooks","issue_events_url":"https://api.github.com/repos/dn-m/Staff/issues/events{/number}","events_url":"https://api.github.com/repos/dn-m/Staff/events","assignees_url":"https://api.github.com/repos/dn-m/Staff/assignees{/user}","branches_url":"https://api.github.com/repos/dn-m/Staff/branches{/branch}","tags_url":"https://api.github.com/repos/dn-m/Staff/tags","blobs_url":"https://api.github.com/repos/dn-m/Staff/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dn-m/Staff/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dn-m/Staff/git/refs{/sha}","trees_url":"https://api.github.com/repos/dn-m/Staff/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dn-m/Staff/statuses/{sha}","languages_url":"https://api.github.com/repos/dn-m/Staff/languages","stargazers_url":"https://api.github.com/repos/dn-m/Staff/stargazers","contributors_url":"https://api.github.com/repos/dn-m/Staff/contributors","subscribers_url":"https://api.github.com/repos/dn-m/Staff/subscribers","subscription_url":"https://api.github.com/repos/dn-m/Staff/subscription","commits_url":"https://api.github.com/repos/dn-m/Staff/commits{/sha}","git_commits_url":"https://api.github.com/repos/dn-m/Staff/git/commits{/sha}","comments_url":"https://api.github.com/repos/dn-m/Staff/comments{/number}","issue_comment_url":"https://api.github.com/repos/dn-m/Staff/issues/comments{/number}","contents_url":"https://api.github.com/repos/dn-m/Staff/contents/{+path}","compare_url":"https://api.github.com/repos/dn-m/Staff/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dn-m/Staff/merges","archive_url":"https://api.github.com/repos/dn-m/Staff/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dn-m/Staff/downloads","issues_url":"https://api.github.com/repos/dn-m/Staff/issues{/number}","pulls_url":"https://api.github.com/repos/dn-m/Staff/pulls{/number}","milestones_url":"https://api.github.com/repos/dn-m/Staff/milestones{/number}","notifications_url":"https://api.github.com/repos/dn-m/Staff/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dn-m/Staff/labels{/name}","releases_url":"https://api.github.com/repos/dn-m/Staff/releases{/id}","deployments_url":"https://api.github.com/repos/dn-m/Staff/deployments","created_at":"2016-06-14T15:03:44Z","updated_at":"2016-06-14T15:04:38Z","pushed_at":"2016-10-28T21:35:01Z","git_url":"git://github.com/dn-m/Staff.git","ssh_url":"git@github.com:dn-m/Staff.git","clone_url":"https://github.com/dn-m/Staff.git","svn_url":"https://github.com/dn-m/Staff","homepage":null,"size":541,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dn-m/Staff/pulls/13"},"html":{"href":"https://github.com/dn-m/Staff/pull/13"},"issue":{"href":"https://api.github.com/repos/dn-m/Staff/issues/13"},"comments":{"href":"https://api.github.com/repos/dn-m/Staff/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/dn-m/Staff/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/dn-m/Staff/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dn-m/Staff/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/dn-m/Staff/statuses/8f252bf473a6a26db330ee6f4c5b421c8ba98b06"}}}}
{"actor":{"display_login":"houndci-bot"}}