{"action":"created","issue":{"url":"https://api.github.com/repos/tonerdo/coverlet/issues/193","repository_url":"https://api.github.com/repos/tonerdo/coverlet","labels_url":"https://api.github.com/repos/tonerdo/coverlet/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/tonerdo/coverlet/issues/193/comments","events_url":"https://api.github.com/repos/tonerdo/coverlet/issues/193/events","html_url":"https://github.com/tonerdo/coverlet/issues/193","id":362053979,"node_id":"MDU6SXNzdWUzNjIwNTM5Nzk=","number":193,"title":"Coverage is 0 when testing only const fields","user":{"login":"LogikBlitz","id":560415,"node_id":"MDQ6VXNlcjU2MDQxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/560415?v=4","gravatar_id":"","url":"https://api.github.com/users/LogikBlitz","html_url":"https://github.com/LogikBlitz","followers_url":"https://api.github.com/users/LogikBlitz/followers","following_url":"https://api.github.com/users/LogikBlitz/following{/other_user}","gists_url":"https://api.github.com/users/LogikBlitz/gists{/gist_id}","starred_url":"https://api.github.com/users/LogikBlitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LogikBlitz/subscriptions","organizations_url":"https://api.github.com/users/LogikBlitz/orgs","repos_url":"https://api.github.com/users/LogikBlitz/repos","events_url":"https://api.github.com/users/LogikBlitz/events{/privacy}","received_events_url":"https://api.github.com/users/LogikBlitz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-20T07:31:23Z","updated_at":"2018-10-16T08:44:59Z","closed_at":null,"author_association":"NONE","body":"I have a project with only a lot of const strings.\r\nWe are testing that the const strings are of course correct so there are a lot of tests.\r\nI am using Coverlet.MsBuild 2.3.0\r\n\r\nSo every line is essentially covered but coverlet reports zero all over.\r\nI have created a small test solution in net standard/core2.1 using xunit2 that has that exact impact.\r\nhttps://gitlab.com/LogikBlitz/coverletfieldtesting/\r\n\r\nFor this specific project i would expect a coverage at 100% since every line is covered.\r\nI would also expect Branch to be 100% - since there is no branches in my code it is all covered - but i am not sure how Coverlet handles branching.\r\n```\r\nTest run for REDACTED/CoverletTest01/CoverletTesting_ConstFields.Test/bin/Debug/netcoreapp2.1/CoverletTesting_ConstFields.Test.dll(.NETCoreApp,Version=v2.1)\r\nMicrosoft (R) Test Execution Command Line Tool Version 15.7.0\r\nCopyright (c) Microsoft Corporation.  All rights reserved.\r\n\r\nStarting test execution, please wait...\r\n\r\nTotal tests: 6. Passed: 6. Failed: 0. Skipped: 0.\r\nTest Run Successful.\r\nTest execution time: 1.6792 Seconds\r\n\r\nCalculating coverage result...\r\n  Generating report 'REDACTED/CoverletTest01/CoverletTesting_ConstFields.Test/coverage.json'\r\n\r\n+-----------------------------+--------+--------+--------+\r\n| Module                      | Line   | Branch | Method |\r\n+-----------------------------+--------+--------+--------+\r\n| CoverletTesting_ConstFields | 0%     | 0%     | 0%     |\r\n+-----------------------------+--------+--------+--------+\r\n```"},"comment":{"url":"https://api.github.com/repos/tonerdo/coverlet/issues/comments/430153417","html_url":"https://github.com/tonerdo/coverlet/issues/193#issuecomment-430153417","issue_url":"https://api.github.com/repos/tonerdo/coverlet/issues/193","id":430153417,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDE1MzQxNw==","user":{"login":"SteveGilham","id":7460854,"node_id":"MDQ6VXNlcjc0NjA4NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7460854?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveGilham","html_url":"https://github.com/SteveGilham","followers_url":"https://api.github.com/users/SteveGilham/followers","following_url":"https://api.github.com/users/SteveGilham/following{/other_user}","gists_url":"https://api.github.com/users/SteveGilham/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveGilham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveGilham/subscriptions","organizations_url":"https://api.github.com/users/SteveGilham/orgs","repos_url":"https://api.github.com/users/SteveGilham/repos","events_url":"https://api.github.com/users/SteveGilham/events{/privacy}","received_events_url":"https://api.github.com/users/SteveGilham/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T08:44:59Z","updated_at":"2018-10-16T08:44:59Z","author_association":"NONE","body":"C# `const` values are in-lined into the consuming assembly at compile time; so in the original case, where only such values are being examined, there will be nothing executed in the assembly under test."}}
{"actor":{"display_login":"SteveGilham"}}