From c594c1bdbe09e9c844b02108c300a4981ad5e7e7 Mon Sep 17 00:00:00 2001 From: Smaug123 <3138005+Smaug123@users.noreply.github.com> Date: Fri, 16 May 2025 14:59:59 +0100 Subject: [PATCH] Demonstrate that enums don't work with doc coverage in C# --- ApiSurface.sln | 6 ++++++ ApiSurface/Test/ApiSurface.Test.fsproj | 4 ++-- ApiSurface/Test/TestDocCoverageCSharp.fs | 13 +++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 ApiSurface/Test/TestDocCoverageCSharp.fs diff --git a/ApiSurface.sln b/ApiSurface.sln index 08bb6f6..ad6426b 100644 --- a/ApiSurface.sln +++ b/ApiSurface.sln @@ -10,6 +10,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ApiSurface.SampleAssembly", EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "ApiSurface.Test", "ApiSurface\Test\ApiSurface.Test.fsproj", "{2A7BE060-01B6-C8F9-6033-BFAAFC84BAF7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApiSurface.CSharpExample", "ApiSurface.CSharpExample\ApiSurface.CSharpExample.csproj", "{CF3C7214-2002-4CAE-AAB9-38AA44D1EEE6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -32,6 +34,10 @@ Global {2A7BE060-01B6-C8F9-6033-BFAAFC84BAF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A7BE060-01B6-C8F9-6033-BFAAFC84BAF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A7BE060-01B6-C8F9-6033-BFAAFC84BAF7}.Release|Any CPU.Build.0 = Release|Any CPU + {CF3C7214-2002-4CAE-AAB9-38AA44D1EEE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF3C7214-2002-4CAE-AAB9-38AA44D1EEE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF3C7214-2002-4CAE-AAB9-38AA44D1EEE6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF3C7214-2002-4CAE-AAB9-38AA44D1EEE6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ApiSurface/Test/ApiSurface.Test.fsproj b/ApiSurface/Test/ApiSurface.Test.fsproj index b9cce3e..7bef380 100644 --- a/ApiSurface/Test/ApiSurface.Test.fsproj +++ b/ApiSurface/Test/ApiSurface.Test.fsproj @@ -2,14 +2,13 @@ net8.0 false - - false + @@ -31,6 +30,7 @@ + diff --git a/ApiSurface/Test/TestDocCoverageCSharp.fs b/ApiSurface/Test/TestDocCoverageCSharp.fs new file mode 100644 index 0000000..9ee56b2 --- /dev/null +++ b/ApiSurface/Test/TestDocCoverageCSharp.fs @@ -0,0 +1,13 @@ +namespace ApiSurface.Test + +open ApiSurface +open NUnit.Framework + +[] +module TestDocCoverageCSharp = + + let sampleAssembly = typeof.Assembly + + [] + let ``Test comparing with identical coverage`` () = + DocCoverage.assertFullyDocumented sampleAssembly