{"action":"created","comment":{"url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/comments/47448111","id":47448111,"diff_hunk":"@@ -3,125 +3,53 @@ package message\n import \"testing\"\n import \"reflect\"\n \n-func TestMessage(t *testing.T) {\n-\tcases := []struct {\n-\t\twords []string\n-\t\tmsg   *Message\n-\t}{\n-\t\t// Empty request\n-\t\t{\n-\t\t\t[]string{\"write\"},\n-\t\t\tNew(RqWrite),\n-\t\t},\n-\t\t// Request with one argument\n-\t\t{\n-\t\t\t[]string{\"read\", \"/control/state\"},\n-\t\t\tNew(RqRead).AddArg(\"/control/state\"),\n-\t\t},\n-\t\t// Request with multiple argument\n-\t\t{\n-\t\t\t[]string{\"write\", \"/player/time\", \"0\"},\n-\t\t\tNew(RqWrite).AddArg(\"/player/time\").AddArg(\"0\"),\n-\t\t},\n-\t\t// Empty response\n-\t\t{\n-\t\t\t[]string{\"RES\"},\n-\t\t\tNew(RsRes),\n-\t\t},\n-\t\t// Response with one argument\n-\t\t{\n-\t\t\t[]string{\"OHAI\", \"playd 1.0.0\"},\n-\t\t\tNew(RsOhai).AddArg(\"playd 1.0.0\"),\n-\t\t},\n-\t\t// Response with multiple argument\n-\t\t{\n-\t\t\t[]string{\"ACK\", \"int\", \"OK\", \"1337\"},\n-\t\t\tNew(RsAck).AddArg(\"int\").AddArg(\"OK\").AddArg(\"1337\"),\n-\t\t},\n-\t}\n-\n-\tfor _, c := range cases {\n-\t\tif c.words[0] != c.msg.Word() {\n-\t\t\tt.Errorf(\"Word() == %q, expected %q\", c.msg.Word(), c.words[0])\n-\t\t}\n-\t}\n-\n-\t// And now, test args.\n-\t// TODO(CaptainHayashi): refactor the above to integrate this test\n-\targs := []string{\"bibbity\", \"bobbity\", \"boo\"}\n-\tmsg := New(\"flax\")\n-\tfor _, arg := range args {\n-\t\tmsg.AddArg(arg)\n-\t}\n-\n-\t// Bounds checking\n-\tfor _, i := range []int{-1, len(args)} {\n-\t\tif _, err := msg.Arg(i); err == nil {\n-\t\t\tt.Errorf(\"Managed to get %dth arg of a %d-arged Message\", i, len(args))\n-\t\t}\n-\t}\n-\n-\tfor i, want := range args {\n-\t\tgot, err := msg.Arg(i)\n-\t\tif err != nil {\n-\t\t\tt.Errorf(\"unexpected error with Arg(%d)\", i)\n-\t\t} else if got != want {\n-\t\t\tt.Errorf(\"Arg(%d) = %q, want %q\", i, got, want)\n-\t\t}\n-\t}\n-\n-\tfor _, c := range cases {\n-\t\tgot, err := LineToMessage(c.words)\n-\t\tif err != nil {\n-\t\t\tt.Errorf(\"unexpected error with: %q\", got)\n-\t\t} else if !reflect.DeepEqual(got, c.msg) {\n-\t\t\tt.Errorf(\"Got %q, wanted %q\", got, c.msg)\n-\t\t}\n-\t}\n-}\n+// It feels like there should be more tests here, but since Message is\n+// essentially just a []string, why bother?","path":"message/message_test.go","position":81,"original_position":81,"commit_id":"3057eb0dd494d27e60df803f6a84bbbedd6af2b9","original_commit_id":"3057eb0dd494d27e60df803f6a84bbbedd6af2b9","user":{"login":"CaptainHayashi","id":374963,"avatar_url":"https://avatars.githubusercontent.com/u/374963?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainHayashi","html_url":"https://github.com/CaptainHayashi","followers_url":"https://api.github.com/users/CaptainHayashi/followers","following_url":"https://api.github.com/users/CaptainHayashi/following{/other_user}","gists_url":"https://api.github.com/users/CaptainHayashi/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainHayashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainHayashi/subscriptions","organizations_url":"https://api.github.com/users/CaptainHayashi/orgs","repos_url":"https://api.github.com/users/CaptainHayashi/repos","events_url":"https://api.github.com/users/CaptainHayashi/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainHayashi/received_events","type":"User","site_admin":false},"body":"ou","created_at":"2015-12-13T18:36:00Z","updated_at":"2015-12-13T18:36:00Z","html_url":"https://github.com/UniversityRadioYork/bifrost-go/pull/22#discussion_r47448111","pull_request_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/comments/47448111"},"html":{"href":"https://github.com/UniversityRadioYork/bifrost-go/pull/22#discussion_r47448111"},"pull_request":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/22","id":52720644,"html_url":"https://github.com/UniversityRadioYork/bifrost-go/pull/22","diff_url":"https://github.com/UniversityRadioYork/bifrost-go/pull/22.diff","patch_url":"https://github.com/UniversityRadioYork/bifrost-go/pull/22.patch","issue_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/issues/22","number":22,"state":"open","locked":false,"title":"Rewrite of Message and a minor Resource tidyup","user":{"login":"LordAro","id":4007992,"avatar_url":"https://avatars.githubusercontent.com/u/4007992?v=3","gravatar_id":"","url":"https://api.github.com/users/LordAro","html_url":"https://github.com/LordAro","followers_url":"https://api.github.com/users/LordAro/followers","following_url":"https://api.github.com/users/LordAro/following{/other_user}","gists_url":"https://api.github.com/users/LordAro/gists{/gist_id}","starred_url":"https://api.github.com/users/LordAro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LordAro/subscriptions","organizations_url":"https://api.github.com/users/LordAro/orgs","repos_url":"https://api.github.com/users/LordAro/repos","events_url":"https://api.github.com/users/LordAro/events{/privacy}","received_events_url":"https://api.github.com/users/LordAro/received_events","type":"User","site_admin":false},"body":"This branch was originally going to be about resources, but I got distracted","created_at":"2015-12-04T20:59:36Z","updated_at":"2015-12-13T18:36:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ec85fb2140e3df810eb0b7356dfa85e3c95ed7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/22/commits","review_comments_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/22/comments","review_comment_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/issues/22/comments","statuses_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/statuses/3057eb0dd494d27e60df803f6a84bbbedd6af2b9","head":{"label":"LordAro:resourceness","ref":"resourceness","sha":"3057eb0dd494d27e60df803f6a84bbbedd6af2b9","user":{"login":"LordAro","id":4007992,"avatar_url":"https://avatars.githubusercontent.com/u/4007992?v=3","gravatar_id":"","url":"https://api.github.com/users/LordAro","html_url":"https://github.com/LordAro","followers_url":"https://api.github.com/users/LordAro/followers","following_url":"https://api.github.com/users/LordAro/following{/other_user}","gists_url":"https://api.github.com/users/LordAro/gists{/gist_id}","starred_url":"https://api.github.com/users/LordAro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LordAro/subscriptions","organizations_url":"https://api.github.com/users/LordAro/orgs","repos_url":"https://api.github.com/users/LordAro/repos","events_url":"https://api.github.com/users/LordAro/events{/privacy}","received_events_url":"https://api.github.com/users/LordAro/received_events","type":"User","site_admin":false},"repo":{"id":42741274,"name":"bifrost-go","full_name":"LordAro/bifrost-go","owner":{"login":"LordAro","id":4007992,"avatar_url":"https://avatars.githubusercontent.com/u/4007992?v=3","gravatar_id":"","url":"https://api.github.com/users/LordAro","html_url":"https://github.com/LordAro","followers_url":"https://api.github.com/users/LordAro/followers","following_url":"https://api.github.com/users/LordAro/following{/other_user}","gists_url":"https://api.github.com/users/LordAro/gists{/gist_id}","starred_url":"https://api.github.com/users/LordAro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LordAro/subscriptions","organizations_url":"https://api.github.com/users/LordAro/orgs","repos_url":"https://api.github.com/users/LordAro/repos","events_url":"https://api.github.com/users/LordAro/events{/privacy}","received_events_url":"https://api.github.com/users/LordAro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LordAro/bifrost-go","description":"Bifrost protocol implementation in Go","fork":true,"url":"https://api.github.com/repos/LordAro/bifrost-go","forks_url":"https://api.github.com/repos/LordAro/bifrost-go/forks","keys_url":"https://api.github.com/repos/LordAro/bifrost-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LordAro/bifrost-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LordAro/bifrost-go/teams","hooks_url":"https://api.github.com/repos/LordAro/bifrost-go/hooks","issue_events_url":"https://api.github.com/repos/LordAro/bifrost-go/issues/events{/number}","events_url":"https://api.github.com/repos/LordAro/bifrost-go/events","assignees_url":"https://api.github.com/repos/LordAro/bifrost-go/assignees{/user}","branches_url":"https://api.github.com/repos/LordAro/bifrost-go/branches{/branch}","tags_url":"https://api.github.com/repos/LordAro/bifrost-go/tags","blobs_url":"https://api.github.com/repos/LordAro/bifrost-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LordAro/bifrost-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LordAro/bifrost-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/LordAro/bifrost-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LordAro/bifrost-go/statuses/{sha}","languages_url":"https://api.github.com/repos/LordAro/bifrost-go/languages","stargazers_url":"https://api.github.com/repos/LordAro/bifrost-go/stargazers","contributors_url":"https://api.github.com/repos/LordAro/bifrost-go/contributors","subscribers_url":"https://api.github.com/repos/LordAro/bifrost-go/subscribers","subscription_url":"https://api.github.com/repos/LordAro/bifrost-go/subscription","commits_url":"https://api.github.com/repos/LordAro/bifrost-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/LordAro/bifrost-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/LordAro/bifrost-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/LordAro/bifrost-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/LordAro/bifrost-go/contents/{+path}","compare_url":"https://api.github.com/repos/LordAro/bifrost-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LordAro/bifrost-go/merges","archive_url":"https://api.github.com/repos/LordAro/bifrost-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LordAro/bifrost-go/downloads","issues_url":"https://api.github.com/repos/LordAro/bifrost-go/issues{/number}","pulls_url":"https://api.github.com/repos/LordAro/bifrost-go/pulls{/number}","milestones_url":"https://api.github.com/repos/LordAro/bifrost-go/milestones{/number}","notifications_url":"https://api.github.com/repos/LordAro/bifrost-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LordAro/bifrost-go/labels{/name}","releases_url":"https://api.github.com/repos/LordAro/bifrost-go/releases{/id}","created_at":"2015-09-18T18:51:41Z","updated_at":"2015-09-18T18:51:42Z","pushed_at":"2015-12-05T10:09:12Z","git_url":"git://github.com/LordAro/bifrost-go.git","ssh_url":"git@github.com:LordAro/bifrost-go.git","clone_url":"https://github.com/LordAro/bifrost-go.git","svn_url":"https://github.com/LordAro/bifrost-go","homepage":"","size":75,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"UniversityRadioYork:master","ref":"master","sha":"d0df422486acbe309bdb3e7aa6a2fdc6a1fd52c8","user":{"login":"UniversityRadioYork","id":823554,"avatar_url":"https://avatars.githubusercontent.com/u/823554?v=3","gravatar_id":"","url":"https://api.github.com/users/UniversityRadioYork","html_url":"https://github.com/UniversityRadioYork","followers_url":"https://api.github.com/users/UniversityRadioYork/followers","following_url":"https://api.github.com/users/UniversityRadioYork/following{/other_user}","gists_url":"https://api.github.com/users/UniversityRadioYork/gists{/gist_id}","starred_url":"https://api.github.com/users/UniversityRadioYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UniversityRadioYork/subscriptions","organizations_url":"https://api.github.com/users/UniversityRadioYork/orgs","repos_url":"https://api.github.com/users/UniversityRadioYork/repos","events_url":"https://api.github.com/users/UniversityRadioYork/events{/privacy}","received_events_url":"https://api.github.com/users/UniversityRadioYork/received_events","type":"Organization","site_admin":false},"repo":{"id":31230951,"name":"bifrost-go","full_name":"UniversityRadioYork/bifrost-go","owner":{"login":"UniversityRadioYork","id":823554,"avatar_url":"https://avatars.githubusercontent.com/u/823554?v=3","gravatar_id":"","url":"https://api.github.com/users/UniversityRadioYork","html_url":"https://github.com/UniversityRadioYork","followers_url":"https://api.github.com/users/UniversityRadioYork/followers","following_url":"https://api.github.com/users/UniversityRadioYork/following{/other_user}","gists_url":"https://api.github.com/users/UniversityRadioYork/gists{/gist_id}","starred_url":"https://api.github.com/users/UniversityRadioYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UniversityRadioYork/subscriptions","organizations_url":"https://api.github.com/users/UniversityRadioYork/orgs","repos_url":"https://api.github.com/users/UniversityRadioYork/repos","events_url":"https://api.github.com/users/UniversityRadioYork/events{/privacy}","received_events_url":"https://api.github.com/users/UniversityRadioYork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UniversityRadioYork/bifrost-go","description":"Bifrost protocol implementation in Go","fork":false,"url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go","forks_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/forks","keys_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/teams","hooks_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/hooks","issue_events_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/issues/events{/number}","events_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/events","assignees_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/assignees{/user}","branches_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/branches{/branch}","tags_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/tags","blobs_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/statuses/{sha}","languages_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/languages","stargazers_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/stargazers","contributors_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/contributors","subscribers_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/subscribers","subscription_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/subscription","commits_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/contents/{+path}","compare_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/merges","archive_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/downloads","issues_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/issues{/number}","pulls_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls{/number}","milestones_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/milestones{/number}","notifications_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/labels{/name}","releases_url":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/releases{/id}","created_at":"2015-02-23T21:32:24Z","updated_at":"2015-08-18T20:00:22Z","pushed_at":"2015-12-05T10:09:13Z","git_url":"git://github.com/UniversityRadioYork/bifrost-go.git","ssh_url":"git@github.com:UniversityRadioYork/bifrost-go.git","clone_url":"https://github.com/UniversityRadioYork/bifrost-go.git","svn_url":"https://github.com/UniversityRadioYork/bifrost-go","homepage":"","size":384,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/22"},"html":{"href":"https://github.com/UniversityRadioYork/bifrost-go/pull/22"},"issue":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/issues/22"},"comments":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/UniversityRadioYork/bifrost-go/statuses/3057eb0dd494d27e60df803f6a84bbbedd6af2b9"}}}}