{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/224894041","pull_request_review_id":164381444,"id":224894041,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDg5NDA0MQ==","diff_hunk":"@@ -395,6 +395,70 @@ public void ReaderIndexIsCorrect()\n             Assert.Equal(buffer.Length, reader.Consumed);\n         }\n \n+        [Theory,\n+            InlineData(1),\n+            InlineData(2),\n+            InlineData(3)]\n+        public void Advance_PositionIsCorrect(int advanceBy)\n+        {\n+            // Check that advancing through the reader gives the same position\n+            // as returned directly from the buffer.\n+\n+            ReadOnlySequence<T> buffer = Factory.CreateWithContent(GetInputData(10));\n+            BufferReader<T> reader = new BufferReader<T>(buffer);\n+\n+            SequencePosition readerPosition = reader.Position;\n+            SequencePosition bufferPosition = buffer.GetPosition(0);\n+            Assert.Equal(readerPosition.GetInteger(), bufferPosition.GetInteger());\n+            Assert.Same(readerPosition.GetObject(), readerPosition.GetObject());\n+\n+            for (int i = advanceBy; i <= buffer.Length; i += advanceBy)\n+            {\n+                reader.Advance(advanceBy);\n+                readerPosition = reader.Position;\n+                bufferPosition = buffer.GetPosition(i);\n+                Assert.Equal(readerPosition.GetInteger(), bufferPosition.GetInteger());\n+                Assert.Same(readerPosition.GetObject(), readerPosition.GetObject());\n+            }\n+        }\n+\n+        [Fact]\n+        public void AdvanceTo()\n+        {\n+            // Ensure we can advance to each of the items in the buffer\n+\n+            T[] inputData = GetInputData(10);\n+            ReadOnlySequence<T> buffer = Factory.CreateWithContent(inputData);\n+\n+            for (int i = 0; i < buffer.Length; i++)\n+            {\n+                BufferReader<T> reader = new BufferReader<T>(buffer);\n+                Assert.True(reader.TryAdvanceTo(inputData[i], advancePastDelimiter: false));\n+                Assert.True(reader.TryPeek(out T value));\n+                Assert.Equal(inputData[i], value);\n+            }\n+        }\n+\n+        [Fact]\n+        public void AdvanceTo_AdvancePast()","path":"tests/System.Buffers.ReaderWriter.Tests/ReaderBasicTests.cs","position":73,"original_position":73,"commit_id":"e5f3161a99072f0f74987a52faf4d30ee67e7d79","original_commit_id":"e5f3161a99072f0f74987a52faf4d30ee67e7d79","user":{"login":"ahsonkhan","id":6527137,"node_id":"MDQ6VXNlcjY1MjcxMzc=","avatar_url":"https://avatars1.githubusercontent.com/u/6527137?v=4","gravatar_id":"","url":"https://api.github.com/users/ahsonkhan","html_url":"https://github.com/ahsonkhan","followers_url":"https://api.github.com/users/ahsonkhan/followers","following_url":"https://api.github.com/users/ahsonkhan/following{/other_user}","gists_url":"https://api.github.com/users/ahsonkhan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahsonkhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahsonkhan/subscriptions","organizations_url":"https://api.github.com/users/ahsonkhan/orgs","repos_url":"https://api.github.com/users/ahsonkhan/repos","events_url":"https://api.github.com/users/ahsonkhan/events{/privacy}","received_events_url":"https://api.github.com/users/ahsonkhan/received_events","type":"User","site_admin":false},"body":"Can we merge AdvanceTo and AdvanceTo_AdvancePast tests and pass in the advancePastDelimiter bool? The tests are very similar.","created_at":"2018-10-12T19:34:57Z","updated_at":"2018-10-12T19:34:58Z","html_url":"https://github.com/dotnet/corefxlab/pull/2534#discussion_r224894041","pull_request_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/2534","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments/224894041"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/2534#discussion_r224894041"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/2534"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corefxlab/pulls/2534","id":222562897,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNTYyODk3","html_url":"https://github.com/dotnet/corefxlab/pull/2534","diff_url":"https://github.com/dotnet/corefxlab/pull/2534.diff","patch_url":"https://github.com/dotnet/corefxlab/pull/2534.patch","issue_url":"https://api.github.com/repos/dotnet/corefxlab/issues/2534","number":2534,"state":"open","locked":false,"title":"Change skip* to advance*.","user":{"login":"JeremyKuhne","id":8184940,"node_id":"MDQ6VXNlcjgxODQ5NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false},"body":"Fix moving past empty sequences.\r\nFix span advance to advancePastDelimiter handling.\r\nAdd IsLastSegment.\r\nAdd 4x faster Position property.\r\nAdd a variety of tests.","created_at":"2018-10-12T19:23:24Z","updated_at":"2018-10-12T19:34:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82b032a9736d735c8c82790e635ec838275fbac6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/2534/commits","review_comments_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/2534/comments","review_comment_url":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/issues/2534/comments","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/e5f3161a99072f0f74987a52faf4d30ee67e7d79","head":{"label":"JeremyKuhne:advanceto","ref":"advanceto","sha":"e5f3161a99072f0f74987a52faf4d30ee67e7d79","user":{"login":"JeremyKuhne","id":8184940,"node_id":"MDQ6VXNlcjgxODQ5NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false},"repo":{"id":109059190,"node_id":"MDEwOlJlcG9zaXRvcnkxMDkwNTkxOTA=","name":"corefxlab","full_name":"JeremyKuhne/corefxlab","private":false,"owner":{"login":"JeremyKuhne","id":8184940,"node_id":"MDQ6VXNlcjgxODQ5NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false},"html_url":"https://github.com/JeremyKuhne/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":true,"url":"https://api.github.com/repos/JeremyKuhne/corefxlab","forks_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/forks","keys_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/teams","hooks_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/events","assignees_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/tags","blobs_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/languages","stargazers_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/subscription","commits_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/merges","archive_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/downloads","issues_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/releases{/id}","deployments_url":"https://api.github.com/repos/JeremyKuhne/corefxlab/deployments","created_at":"2017-10-31T22:33:22Z","updated_at":"2018-09-25T18:08:16Z","pushed_at":"2018-10-12T19:22:01Z","git_url":"git://github.com/JeremyKuhne/corefxlab.git","ssh_url":"git@github.com:JeremyKuhne/corefxlab.git","clone_url":"https://github.com/JeremyKuhne/corefxlab.git","svn_url":"https://github.com/JeremyKuhne/corefxlab","homepage":"","size":57569,"stargazers_count":0,"watchers_count":0,"language":"C#","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":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"3dfb47a43dbb0643f721ce05731aa55e7cd87d46","user":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29504192,"node_id":"MDEwOlJlcG9zaXRvcnkyOTUwNDE5Mg==","name":"corefxlab","full_name":"dotnet/corefxlab","private":false,"owner":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dotnet/corefxlab","description":"This repo is for experimentation and exploring new ideas that may or may not make it into the main corefx repo.","fork":false,"url":"https://api.github.com/repos/dotnet/corefxlab","forks_url":"https://api.github.com/repos/dotnet/corefxlab/forks","keys_url":"https://api.github.com/repos/dotnet/corefxlab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corefxlab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corefxlab/teams","hooks_url":"https://api.github.com/repos/dotnet/corefxlab/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corefxlab/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corefxlab/events","assignees_url":"https://api.github.com/repos/dotnet/corefxlab/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corefxlab/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corefxlab/tags","blobs_url":"https://api.github.com/repos/dotnet/corefxlab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corefxlab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corefxlab/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corefxlab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corefxlab/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corefxlab/languages","stargazers_url":"https://api.github.com/repos/dotnet/corefxlab/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corefxlab/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corefxlab/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corefxlab/subscription","commits_url":"https://api.github.com/repos/dotnet/corefxlab/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corefxlab/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corefxlab/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corefxlab/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corefxlab/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corefxlab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corefxlab/merges","archive_url":"https://api.github.com/repos/dotnet/corefxlab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corefxlab/downloads","issues_url":"https://api.github.com/repos/dotnet/corefxlab/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corefxlab/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corefxlab/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corefxlab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corefxlab/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corefxlab/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corefxlab/deployments","created_at":"2015-01-20T00:44:35Z","updated_at":"2018-10-11T15:08:35Z","pushed_at":"2018-10-12T19:34:12Z","git_url":"git://github.com/dotnet/corefxlab.git","ssh_url":"git@github.com:dotnet/corefxlab.git","clone_url":"https://github.com/dotnet/corefxlab.git","svn_url":"https://github.com/dotnet/corefxlab","homepage":"","size":57737,"stargazers_count":1189,"watchers_count":1189,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":312,"mirror_url":null,"archived":false,"open_issues_count":200,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":312,"open_issues":200,"watchers":1189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/2534"},"html":{"href":"https://github.com/dotnet/corefxlab/pull/2534"},"issue":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/2534"},"comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/issues/2534/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/2534/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corefxlab/pulls/2534/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corefxlab/statuses/e5f3161a99072f0f74987a52faf4d30ee67e7d79"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ahsonkhan"}}