{"action":"created","comment":{"url":"https://api.github.com/repos/bifurcation/mint/pulls/comments/170390282","pull_request_review_id":99076108,"id":170390282,"diff_hunk":"@@ -81,12 +81,81 @@ func assertCipherSuiteParamsEquals(t *testing.T, a, b CipherSuiteParams) {\n \n func assertDeepEquals(t *testing.T, a, b interface{}) {\n \tt.Helper()\n-\tassert(t, reflect.DeepEqual(a, b), fmt.Sprintf(\"%+v != %+v\", a, b))\n+\tassertTrue(t, reflect.DeepEqual(a, b), fmt.Sprintf(\"%+v != %+v\", a, b))\n }\n \n func assertSameType(t *testing.T, a, b interface{}) {\n \tt.Helper()\n \tA := reflect.TypeOf(a)\n \tB := reflect.TypeOf(b)\n-\tassert(t, A == B, fmt.Sprintf(\"%s != %s\", A.Name(), B.Name()))\n+\tassertTrue(t, A == B, fmt.Sprintf(\"%s != %s\", A.Name(), B.Name()))\n+}\n+\n+// Utilities for parametrized tests\n+// Represents the configuration for a given test instance.\n+type testInstanceState interface {\n+\tset(string, string)\n+\tget(string) string\n+}\n+\n+// This complicated mixin stuff is in case we want to extend this to\n+// pass other parameters that aren't srings. Arguably YAGNI.\n+type testInstanceStateMixin struct {\n+\tparams map[string]string\n+}\n+\n+func (m *testInstanceStateMixin) set(k string, v string) {\n+\tm.params[k] = v\n+}\n+\n+func (m *testInstanceStateMixin) get(k string) string {\n+\treturn m.params[k]\n+}\n+\n+func newTestInstanceStateMixin() testInstanceStateMixin {\n+\treturn testInstanceStateMixin{make(map[string]string, 0)}\n+}\n+\n+type testInstanceStateBase struct {\n+\ttestInstanceStateMixin\n+}\n+\n+func newTestInstanceStateBase() testInstanceState {\n+\treturn &testInstanceStateBase{newTestInstanceStateMixin()}\n+}\n+\n+// Helper function.\n+func runParametrizedInner(t *testing.T, name string, state testInstanceState, inparams []testParameter, f parametrizedTest) {\n+\tnext := inparams[1:]\n+\n+\tparam := inparams[0]\n+\tfor _, p := range param.vals {\n+\t\tstate.set(param.name, p)\n+\t\tvar n string\n+\t\tif len(name) > 0 {\n+\t\t\tn = name + \"/\"\n+\t\t}\n+\t\tn = n + param.name + \"=\" + p\n+\n+\t\tif len(next) == 0 {\n+\t\t\tt.Run(n, func(t *testing.T) {\n+\t\t\t\tf(t, n, state)\n+\t\t\t})\n+\t\t\tcontinue\n+\t\t}\n+\t\trunParametrizedInner(t, n, state, next, f)\n+\t}\n+}\n+\n+// Nominally public API.\n+type testParameter struct {","path":"common_test.go","position":130,"original_position":130,"commit_id":"489ad72ace4284530c9dbf5968bc584b5e26b7bf","original_commit_id":"489ad72ace4284530c9dbf5968bc584b5e26b7bf","user":{"login":"bifurcation","id":75597,"avatar_url":"https://avatars0.githubusercontent.com/u/75597?v=4","gravatar_id":"","url":"https://api.github.com/users/bifurcation","html_url":"https://github.com/bifurcation","followers_url":"https://api.github.com/users/bifurcation/followers","following_url":"https://api.github.com/users/bifurcation/following{/other_user}","gists_url":"https://api.github.com/users/bifurcation/gists{/gist_id}","starred_url":"https://api.github.com/users/bifurcation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifurcation/subscriptions","organizations_url":"https://api.github.com/users/bifurcation/orgs","repos_url":"https://api.github.com/users/bifurcation/repos","events_url":"https://api.github.com/users/bifurcation/events{/privacy}","received_events_url":"https://api.github.com/users/bifurcation/received_events","type":"User","site_admin":false},"body":"It seems like instead of having this struct and a bunch of `[]testParameter`, you could just do something like:\r\n\r\n`type testParams map[string][]string`","created_at":"2018-02-23T23:07:16Z","updated_at":"2018-02-23T23:39:32Z","html_url":"https://github.com/bifurcation/mint/pull/177#discussion_r170390282","pull_request_url":"https://api.github.com/repos/bifurcation/mint/pulls/177","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/bifurcation/mint/pulls/comments/170390282"},"html":{"href":"https://github.com/bifurcation/mint/pull/177#discussion_r170390282"},"pull_request":{"href":"https://api.github.com/repos/bifurcation/mint/pulls/177"}}},"pull_request":{"url":"https://api.github.com/repos/bifurcation/mint/pulls/177","id":171096501,"html_url":"https://github.com/bifurcation/mint/pull/177","diff_url":"https://github.com/bifurcation/mint/pull/177.diff","patch_url":"https://github.com/bifurcation/mint/pull/177.patch","issue_url":"https://api.github.com/repos/bifurcation/mint/issues/177","number":177,"state":"open","locked":false,"title":"Enhance dtls2","user":{"login":"ekr","id":1111457,"avatar_url":"https://avatars0.githubusercontent.com/u/1111457?v=4","gravatar_id":"","url":"https://api.github.com/users/ekr","html_url":"https://github.com/ekr","followers_url":"https://api.github.com/users/ekr/followers","following_url":"https://api.github.com/users/ekr/following{/other_user}","gists_url":"https://api.github.com/users/ekr/gists{/gist_id}","starred_url":"https://api.github.com/users/ekr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekr/subscriptions","organizations_url":"https://api.github.com/users/ekr/orgs","repos_url":"https://api.github.com/users/ekr/repos","events_url":"https://api.github.com/users/ekr/events{/privacy}","received_events_url":"https://api.github.com/users/ekr/received_events","type":"User","site_admin":false},"body":"This is really enormous, and as noted in the comments, not quite done, but I also want to get it landed before we have more rebase issues.\r\n\r\n@bifurcation: LMK if you want me to file issues for the known deficiencies","created_at":"2018-02-23T19:28:10Z","updated_at":"2018-02-23T23:39:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b506058b6a2916cfd8c63d5173f0773c31406ca7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bifurcation/mint/pulls/177/commits","review_comments_url":"https://api.github.com/repos/bifurcation/mint/pulls/177/comments","review_comment_url":"https://api.github.com/repos/bifurcation/mint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bifurcation/mint/issues/177/comments","statuses_url":"https://api.github.com/repos/bifurcation/mint/statuses/489ad72ace4284530c9dbf5968bc584b5e26b7bf","head":{"label":"ekr:enhance_dtls2","ref":"enhance_dtls2","sha":"489ad72ace4284530c9dbf5968bc584b5e26b7bf","user":{"login":"ekr","id":1111457,"avatar_url":"https://avatars0.githubusercontent.com/u/1111457?v=4","gravatar_id":"","url":"https://api.github.com/users/ekr","html_url":"https://github.com/ekr","followers_url":"https://api.github.com/users/ekr/followers","following_url":"https://api.github.com/users/ekr/following{/other_user}","gists_url":"https://api.github.com/users/ekr/gists{/gist_id}","starred_url":"https://api.github.com/users/ekr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekr/subscriptions","organizations_url":"https://api.github.com/users/ekr/orgs","repos_url":"https://api.github.com/users/ekr/repos","events_url":"https://api.github.com/users/ekr/events{/privacy}","received_events_url":"https://api.github.com/users/ekr/received_events","type":"User","site_admin":false},"repo":{"id":55315265,"name":"mint","full_name":"ekr/mint","owner":{"login":"ekr","id":1111457,"avatar_url":"https://avatars0.githubusercontent.com/u/1111457?v=4","gravatar_id":"","url":"https://api.github.com/users/ekr","html_url":"https://github.com/ekr","followers_url":"https://api.github.com/users/ekr/followers","following_url":"https://api.github.com/users/ekr/following{/other_user}","gists_url":"https://api.github.com/users/ekr/gists{/gist_id}","starred_url":"https://api.github.com/users/ekr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekr/subscriptions","organizations_url":"https://api.github.com/users/ekr/orgs","repos_url":"https://api.github.com/users/ekr/repos","events_url":"https://api.github.com/users/ekr/events{/privacy}","received_events_url":"https://api.github.com/users/ekr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ekr/mint","description":"A Minimal TLS 1.3 Implementation in Go","fork":true,"url":"https://api.github.com/repos/ekr/mint","forks_url":"https://api.github.com/repos/ekr/mint/forks","keys_url":"https://api.github.com/repos/ekr/mint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekr/mint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekr/mint/teams","hooks_url":"https://api.github.com/repos/ekr/mint/hooks","issue_events_url":"https://api.github.com/repos/ekr/mint/issues/events{/number}","events_url":"https://api.github.com/repos/ekr/mint/events","assignees_url":"https://api.github.com/repos/ekr/mint/assignees{/user}","branches_url":"https://api.github.com/repos/ekr/mint/branches{/branch}","tags_url":"https://api.github.com/repos/ekr/mint/tags","blobs_url":"https://api.github.com/repos/ekr/mint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekr/mint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekr/mint/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekr/mint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekr/mint/statuses/{sha}","languages_url":"https://api.github.com/repos/ekr/mint/languages","stargazers_url":"https://api.github.com/repos/ekr/mint/stargazers","contributors_url":"https://api.github.com/repos/ekr/mint/contributors","subscribers_url":"https://api.github.com/repos/ekr/mint/subscribers","subscription_url":"https://api.github.com/repos/ekr/mint/subscription","commits_url":"https://api.github.com/repos/ekr/mint/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekr/mint/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekr/mint/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekr/mint/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekr/mint/contents/{+path}","compare_url":"https://api.github.com/repos/ekr/mint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekr/mint/merges","archive_url":"https://api.github.com/repos/ekr/mint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekr/mint/downloads","issues_url":"https://api.github.com/repos/ekr/mint/issues{/number}","pulls_url":"https://api.github.com/repos/ekr/mint/pulls{/number}","milestones_url":"https://api.github.com/repos/ekr/mint/milestones{/number}","notifications_url":"https://api.github.com/repos/ekr/mint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekr/mint/labels{/name}","releases_url":"https://api.github.com/repos/ekr/mint/releases{/id}","deployments_url":"https://api.github.com/repos/ekr/mint/deployments","created_at":"2016-04-02T20:42:22Z","updated_at":"2016-04-02T20:42:26Z","pushed_at":"2018-02-23T22:46:33Z","git_url":"git://github.com/ekr/mint.git","ssh_url":"git@github.com:ekr/mint.git","clone_url":"https://github.com/ekr/mint.git","svn_url":"https://github.com/ekr/mint","homepage":null,"size":877,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"bifurcation:master","ref":"master","sha":"340be3ae8c0ff8edce24cf59e7acdb1432bd5ce5","user":{"login":"bifurcation","id":75597,"avatar_url":"https://avatars0.githubusercontent.com/u/75597?v=4","gravatar_id":"","url":"https://api.github.com/users/bifurcation","html_url":"https://github.com/bifurcation","followers_url":"https://api.github.com/users/bifurcation/followers","following_url":"https://api.github.com/users/bifurcation/following{/other_user}","gists_url":"https://api.github.com/users/bifurcation/gists{/gist_id}","starred_url":"https://api.github.com/users/bifurcation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifurcation/subscriptions","organizations_url":"https://api.github.com/users/bifurcation/orgs","repos_url":"https://api.github.com/users/bifurcation/repos","events_url":"https://api.github.com/users/bifurcation/events{/privacy}","received_events_url":"https://api.github.com/users/bifurcation/received_events","type":"User","site_admin":false},"repo":{"id":52216913,"name":"mint","full_name":"bifurcation/mint","owner":{"login":"bifurcation","id":75597,"avatar_url":"https://avatars0.githubusercontent.com/u/75597?v=4","gravatar_id":"","url":"https://api.github.com/users/bifurcation","html_url":"https://github.com/bifurcation","followers_url":"https://api.github.com/users/bifurcation/followers","following_url":"https://api.github.com/users/bifurcation/following{/other_user}","gists_url":"https://api.github.com/users/bifurcation/gists{/gist_id}","starred_url":"https://api.github.com/users/bifurcation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bifurcation/subscriptions","organizations_url":"https://api.github.com/users/bifurcation/orgs","repos_url":"https://api.github.com/users/bifurcation/repos","events_url":"https://api.github.com/users/bifurcation/events{/privacy}","received_events_url":"https://api.github.com/users/bifurcation/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bifurcation/mint","description":"A Minimal TLS 1.3 Implementation in Go","fork":false,"url":"https://api.github.com/repos/bifurcation/mint","forks_url":"https://api.github.com/repos/bifurcation/mint/forks","keys_url":"https://api.github.com/repos/bifurcation/mint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bifurcation/mint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bifurcation/mint/teams","hooks_url":"https://api.github.com/repos/bifurcation/mint/hooks","issue_events_url":"https://api.github.com/repos/bifurcation/mint/issues/events{/number}","events_url":"https://api.github.com/repos/bifurcation/mint/events","assignees_url":"https://api.github.com/repos/bifurcation/mint/assignees{/user}","branches_url":"https://api.github.com/repos/bifurcation/mint/branches{/branch}","tags_url":"https://api.github.com/repos/bifurcation/mint/tags","blobs_url":"https://api.github.com/repos/bifurcation/mint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bifurcation/mint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bifurcation/mint/git/refs{/sha}","trees_url":"https://api.github.com/repos/bifurcation/mint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bifurcation/mint/statuses/{sha}","languages_url":"https://api.github.com/repos/bifurcation/mint/languages","stargazers_url":"https://api.github.com/repos/bifurcation/mint/stargazers","contributors_url":"https://api.github.com/repos/bifurcation/mint/contributors","subscribers_url":"https://api.github.com/repos/bifurcation/mint/subscribers","subscription_url":"https://api.github.com/repos/bifurcation/mint/subscription","commits_url":"https://api.github.com/repos/bifurcation/mint/commits{/sha}","git_commits_url":"https://api.github.com/repos/bifurcation/mint/git/commits{/sha}","comments_url":"https://api.github.com/repos/bifurcation/mint/comments{/number}","issue_comment_url":"https://api.github.com/repos/bifurcation/mint/issues/comments{/number}","contents_url":"https://api.github.com/repos/bifurcation/mint/contents/{+path}","compare_url":"https://api.github.com/repos/bifurcation/mint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bifurcation/mint/merges","archive_url":"https://api.github.com/repos/bifurcation/mint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bifurcation/mint/downloads","issues_url":"https://api.github.com/repos/bifurcation/mint/issues{/number}","pulls_url":"https://api.github.com/repos/bifurcation/mint/pulls{/number}","milestones_url":"https://api.github.com/repos/bifurcation/mint/milestones{/number}","notifications_url":"https://api.github.com/repos/bifurcation/mint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bifurcation/mint/labels{/name}","releases_url":"https://api.github.com/repos/bifurcation/mint/releases{/id}","deployments_url":"https://api.github.com/repos/bifurcation/mint/deployments","created_at":"2016-02-21T16:54:44Z","updated_at":"2018-02-17T16:55:03Z","pushed_at":"2018-02-23T22:46:34Z","git_url":"git://github.com/bifurcation/mint.git","ssh_url":"git@github.com:bifurcation/mint.git","clone_url":"https://github.com/bifurcation/mint.git","svn_url":"https://github.com/bifurcation/mint","homepage":null,"size":815,"stargazers_count":120,"watchers_count":120,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":18,"open_issues":29,"watchers":120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bifurcation/mint/pulls/177"},"html":{"href":"https://github.com/bifurcation/mint/pull/177"},"issue":{"href":"https://api.github.com/repos/bifurcation/mint/issues/177"},"comments":{"href":"https://api.github.com/repos/bifurcation/mint/issues/177/comments"},"review_comments":{"href":"https://api.github.com/repos/bifurcation/mint/pulls/177/comments"},"review_comment":{"href":"https://api.github.com/repos/bifurcation/mint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bifurcation/mint/pulls/177/commits"},"statuses":{"href":"https://api.github.com/repos/bifurcation/mint/statuses/489ad72ace4284530c9dbf5968bc584b5e26b7bf"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"bifurcation"}}