{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/corert/pulls/comments/118956535","pull_request_review_id":40796026,"id":118956535,"diff_hunk":"@@ -0,0 +1,208 @@\n+﻿// Licensed to the .NET Foundation under one or more agreements.\n+// The .NET Foundation licenses this file to you under the MIT license.\n+// See the LICENSE file in the project root for more information.\n+\n+using System;\n+using System.Collections.Generic;\n+using Internal.IL;\n+using Internal.TypeSystem.Ecma;\n+using Xunit;\n+\n+namespace ILVerify.Tests\n+{\n+    abstract class TestCase\n+    {\n+        public string MethodName { get; set; }\n+        public ILImporter ILImporter { get; set; }\n+    }\n+\n+    /// <summary>\n+    /// Describes a test case with a method that contains valid IL\n+    /// </summary>\n+    class ValidILTestCase : TestCase { }\n+\n+    /// <summary>\n+    /// Describes a test case with a method that contains invalid IL with the expected VerifierErrors\n+    /// </summary>\n+    class InvalidILTestCase : TestCase\n+    {\n+        public List<VerifierError> ExpectedVerifierError { get; set; }\n+\n+        /// <summary>\n+        /// The expected exception during validation.\n+        /// If no exception is thrown during verification this must be null.\n+        /// </summary>\n+        public bool ExpectsException { get; set; }\n+    }\n+\n+    /// <summary>\n+    /// Parses the methods in the test assemblies. \n+    /// It loads all assemblies from the test folder defined in <code>TestDataLoader.TESTASSEMBLYPATH</code>\n+    /// This class feeds the xunit Theories\n+    /// </summary>\n+    class ILReader","path":"src/ILVerify/tests/ILMethodTester.cs","position":43,"original_position":43,"commit_id":"4e4a9bffea84db3d1feea0b25e54908f34b6e733","original_commit_id":"4e4a9bffea84db3d1feea0b25e54908f34b6e733","user":{"login":"gregkalapos","id":1091853,"avatar_url":"https://avatars1.githubusercontent.com/u/1091853?v=3","gravatar_id":"","url":"https://api.github.com/users/gregkalapos","html_url":"https://github.com/gregkalapos","followers_url":"https://api.github.com/users/gregkalapos/followers","following_url":"https://api.github.com/users/gregkalapos/following{/other_user}","gists_url":"https://api.github.com/users/gregkalapos/gists{/gist_id}","starred_url":"https://api.github.com/users/gregkalapos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregkalapos/subscriptions","organizations_url":"https://api.github.com/users/gregkalapos/orgs","repos_url":"https://api.github.com/users/gregkalapos/repos","events_url":"https://api.github.com/users/gregkalapos/events{/privacy}","received_events_url":"https://api.github.com/users/gregkalapos/received_events","type":"User","site_admin":false},"body":"Yes, merged.","created_at":"2017-05-29T15:31:08Z","updated_at":"2017-05-29T15:31:08Z","html_url":"https://github.com/dotnet/corert/pull/3725#discussion_r118956535","pull_request_url":"https://api.github.com/repos/dotnet/corert/pulls/3725","_links":{"self":{"href":"https://api.github.com/repos/dotnet/corert/pulls/comments/118956535"},"html":{"href":"https://github.com/dotnet/corert/pull/3725#discussion_r118956535"},"pull_request":{"href":"https://api.github.com/repos/dotnet/corert/pulls/3725"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/corert/pulls/3725","id":122732305,"html_url":"https://github.com/dotnet/corert/pull/3725","diff_url":"https://github.com/dotnet/corert/pull/3725.diff","patch_url":"https://github.com/dotnet/corert/pull/3725.patch","issue_url":"https://api.github.com/repos/dotnet/corert/issues/3725","number":3725,"state":"open","locked":false,"title":"[ILVerify] Added first tests","user":{"login":"gregkalapos","id":1091853,"avatar_url":"https://avatars1.githubusercontent.com/u/1091853?v=3","gravatar_id":"","url":"https://api.github.com/users/gregkalapos","html_url":"https://github.com/gregkalapos","followers_url":"https://api.github.com/users/gregkalapos/followers","following_url":"https://api.github.com/users/gregkalapos/following{/other_user}","gists_url":"https://api.github.com/users/gregkalapos/gists{/gist_id}","starred_url":"https://api.github.com/users/gregkalapos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregkalapos/subscriptions","organizations_url":"https://api.github.com/users/gregkalapos/orgs","repos_url":"https://api.github.com/users/gregkalapos/repos","events_url":"https://api.github.com/users/gregkalapos/events{/privacy}","received_events_url":"https://api.github.com/users/gregkalapos/received_events","type":"User","site_admin":false},"body":"https://github.com/dotnet/corert/issues/3569\r\n\r\n-Added a .sln solution file\r\n-Changed the main ILVerify project to the new .csproj format + ILVerify now targets netcoreapp2.0\r\n-Added an xunit based project for testing  - 1 Method for testing methods with valid IL, 1 Method for testing methods with invalid IL.\r\n-This xunit based test project uses `Theory `and `MemberData ` to feed the test methods based on a naming convention defined in the comment in `ILMethodTester.cs` (one it's finished they will be in the readme file)\r\n-Added the first .il file (with 2 small tests) as a test driver\r\n\r\nOne potential issue:\r\n-netcoreapp2.0 won't work with VS2015 and the last RTM release of VS2017. I use the latest VS2017 preview, which supports netcoreapp2.0, plus of course command line tooling also works. Alternatives to netcoreapp2.0: \r\n1) netcoreapp1.1: The code base has some APIs, which are not part of netstandard 1.x, so it would need more massage. Plus I guess on the long run we want to target netcoreapp2.0 anyway. \r\n2) stay with the old format: I think we want to migrate away from that, but I gave it a try: I was not able to have a working setup after ~2 hours. \r\n\r\nSo my suggestion: let's go with netcoreapp2.0 and VS 2017 preview, or command line. (edit: -a few hours later- after seeing the failing builds I'm not so sure anymore...) \r\n\r\nFurther questions:\r\n-How should we compile the .il files? I saw an .ilproj on the TypeSystem solution, but that also seems to be the old format. Currently I call ilasm manually. (so that step is definitely missing in this PR)\r\n-What should be the output folder of the ilasm compilation? (currently the tests expect the dlls to be in the same folder (src\\ILVerify\\tests\\ILTests), which I guess is not what we want).\r\n-For the tests I think a base library is needed (with System.Object, etc.). I use the CoreTestAssembly from the TypeSystem tests as a \"dummy mscorlib\". This is how I reference it: https://github.com/dotnet/corert/compare/master...gregkalapos:Tests?expand=1#diff-099cd076d34a4cba24feb47d7aedd9fcR17. But I guess that's wrong.. How should I do that?\r\n\r\nThanks","created_at":"2017-05-26T22:54:58Z","updated_at":"2017-05-29T15:31:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8c810f937563187e17f30dae5e2894e3b338c67","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/corert/pulls/3725/commits","review_comments_url":"https://api.github.com/repos/dotnet/corert/pulls/3725/comments","review_comment_url":"https://api.github.com/repos/dotnet/corert/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/corert/issues/3725/comments","statuses_url":"https://api.github.com/repos/dotnet/corert/statuses/4e4a9bffea84db3d1feea0b25e54908f34b6e733","head":{"label":"gregkalapos:Tests","ref":"Tests","sha":"4e4a9bffea84db3d1feea0b25e54908f34b6e733","user":{"login":"gregkalapos","id":1091853,"avatar_url":"https://avatars1.githubusercontent.com/u/1091853?v=3","gravatar_id":"","url":"https://api.github.com/users/gregkalapos","html_url":"https://github.com/gregkalapos","followers_url":"https://api.github.com/users/gregkalapos/followers","following_url":"https://api.github.com/users/gregkalapos/following{/other_user}","gists_url":"https://api.github.com/users/gregkalapos/gists{/gist_id}","starred_url":"https://api.github.com/users/gregkalapos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregkalapos/subscriptions","organizations_url":"https://api.github.com/users/gregkalapos/orgs","repos_url":"https://api.github.com/users/gregkalapos/repos","events_url":"https://api.github.com/users/gregkalapos/events{/privacy}","received_events_url":"https://api.github.com/users/gregkalapos/received_events","type":"User","site_admin":false},"repo":{"id":89678868,"name":"corert","full_name":"gregkalapos/corert","owner":{"login":"gregkalapos","id":1091853,"avatar_url":"https://avatars1.githubusercontent.com/u/1091853?v=3","gravatar_id":"","url":"https://api.github.com/users/gregkalapos","html_url":"https://github.com/gregkalapos","followers_url":"https://api.github.com/users/gregkalapos/followers","following_url":"https://api.github.com/users/gregkalapos/following{/other_user}","gists_url":"https://api.github.com/users/gregkalapos/gists{/gist_id}","starred_url":"https://api.github.com/users/gregkalapos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregkalapos/subscriptions","organizations_url":"https://api.github.com/users/gregkalapos/orgs","repos_url":"https://api.github.com/users/gregkalapos/repos","events_url":"https://api.github.com/users/gregkalapos/events{/privacy}","received_events_url":"https://api.github.com/users/gregkalapos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gregkalapos/corert","description":"This repo contains CoreRT, a .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying .NET Native compiler toolchain.","fork":true,"url":"https://api.github.com/repos/gregkalapos/corert","forks_url":"https://api.github.com/repos/gregkalapos/corert/forks","keys_url":"https://api.github.com/repos/gregkalapos/corert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gregkalapos/corert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gregkalapos/corert/teams","hooks_url":"https://api.github.com/repos/gregkalapos/corert/hooks","issue_events_url":"https://api.github.com/repos/gregkalapos/corert/issues/events{/number}","events_url":"https://api.github.com/repos/gregkalapos/corert/events","assignees_url":"https://api.github.com/repos/gregkalapos/corert/assignees{/user}","branches_url":"https://api.github.com/repos/gregkalapos/corert/branches{/branch}","tags_url":"https://api.github.com/repos/gregkalapos/corert/tags","blobs_url":"https://api.github.com/repos/gregkalapos/corert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gregkalapos/corert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gregkalapos/corert/git/refs{/sha}","trees_url":"https://api.github.com/repos/gregkalapos/corert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gregkalapos/corert/statuses/{sha}","languages_url":"https://api.github.com/repos/gregkalapos/corert/languages","stargazers_url":"https://api.github.com/repos/gregkalapos/corert/stargazers","contributors_url":"https://api.github.com/repos/gregkalapos/corert/contributors","subscribers_url":"https://api.github.com/repos/gregkalapos/corert/subscribers","subscription_url":"https://api.github.com/repos/gregkalapos/corert/subscription","commits_url":"https://api.github.com/repos/gregkalapos/corert/commits{/sha}","git_commits_url":"https://api.github.com/repos/gregkalapos/corert/git/commits{/sha}","comments_url":"https://api.github.com/repos/gregkalapos/corert/comments{/number}","issue_comment_url":"https://api.github.com/repos/gregkalapos/corert/issues/comments{/number}","contents_url":"https://api.github.com/repos/gregkalapos/corert/contents/{+path}","compare_url":"https://api.github.com/repos/gregkalapos/corert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gregkalapos/corert/merges","archive_url":"https://api.github.com/repos/gregkalapos/corert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gregkalapos/corert/downloads","issues_url":"https://api.github.com/repos/gregkalapos/corert/issues{/number}","pulls_url":"https://api.github.com/repos/gregkalapos/corert/pulls{/number}","milestones_url":"https://api.github.com/repos/gregkalapos/corert/milestones{/number}","notifications_url":"https://api.github.com/repos/gregkalapos/corert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gregkalapos/corert/labels{/name}","releases_url":"https://api.github.com/repos/gregkalapos/corert/releases{/id}","deployments_url":"https://api.github.com/repos/gregkalapos/corert/deployments","created_at":"2017-04-28T07:15:25Z","updated_at":"2017-04-28T07:15:34Z","pushed_at":"2017-05-29T09:26:30Z","git_url":"git://github.com/gregkalapos/corert.git","ssh_url":"git@github.com:gregkalapos/corert.git","clone_url":"https://github.com/gregkalapos/corert.git","svn_url":"https://github.com/gregkalapos/corert","homepage":"http://dot.net","size":18161,"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":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"b202bbf68bc0475403e583f703470738e730dc5b","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars3.githubusercontent.com/u/9141961?v=3","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":42552143,"name":"corert","full_name":"dotnet/corert","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars3.githubusercontent.com/u/9141961?v=3","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},"private":false,"html_url":"https://github.com/dotnet/corert","description":"This repo contains CoreRT, a .NET Core runtime optimized for AOT (ahead of time compilation) scenarios, with the accompanying .NET Native compiler toolchain.","fork":false,"url":"https://api.github.com/repos/dotnet/corert","forks_url":"https://api.github.com/repos/dotnet/corert/forks","keys_url":"https://api.github.com/repos/dotnet/corert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/corert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/corert/teams","hooks_url":"https://api.github.com/repos/dotnet/corert/hooks","issue_events_url":"https://api.github.com/repos/dotnet/corert/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/corert/events","assignees_url":"https://api.github.com/repos/dotnet/corert/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/corert/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/corert/tags","blobs_url":"https://api.github.com/repos/dotnet/corert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/corert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/corert/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/corert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/corert/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/corert/languages","stargazers_url":"https://api.github.com/repos/dotnet/corert/stargazers","contributors_url":"https://api.github.com/repos/dotnet/corert/contributors","subscribers_url":"https://api.github.com/repos/dotnet/corert/subscribers","subscription_url":"https://api.github.com/repos/dotnet/corert/subscription","commits_url":"https://api.github.com/repos/dotnet/corert/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/corert/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/corert/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/corert/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/corert/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/corert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/corert/merges","archive_url":"https://api.github.com/repos/dotnet/corert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/corert/downloads","issues_url":"https://api.github.com/repos/dotnet/corert/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/corert/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/corert/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/corert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/corert/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/corert/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/corert/deployments","created_at":"2015-09-15T23:10:53Z","updated_at":"2017-05-26T23:01:45Z","pushed_at":"2017-05-29T14:32:59Z","git_url":"git://github.com/dotnet/corert.git","ssh_url":"git@github.com:dotnet/corert.git","clone_url":"https://github.com/dotnet/corert.git","svn_url":"https://github.com/dotnet/corert","homepage":"http://dot.net","size":18271,"stargazers_count":616,"watchers_count":616,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":210,"mirror_url":null,"open_issues_count":217,"forks":210,"open_issues":217,"watchers":616,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/corert/pulls/3725"},"html":{"href":"https://github.com/dotnet/corert/pull/3725"},"issue":{"href":"https://api.github.com/repos/dotnet/corert/issues/3725"},"comments":{"href":"https://api.github.com/repos/dotnet/corert/issues/3725/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/corert/pulls/3725/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/corert/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/corert/pulls/3725/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/corert/statuses/4e4a9bffea84db3d1feea0b25e54908f34b6e733"}}}}
{"actor":{"display_login":"gregkalapos"}}