Skip to content

Commit 4293074

Browse files
committed
Add 'UsePublicAccessibility' unit test
1 parent 15bbbee commit 4293074

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

PolySharp.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<File Path="tests/PolySharp.NuGet/PolySharp.NuGet.csproj" />
99
<Project Path="tests/PolySharp.MinimumCSharpVersion.Tests/PolySharp.MinimumCSharpVersion.Tests.csproj" />
1010
<Project Path="tests/PolySharp.PolySharpUseTypeAliasForUnmanagedCallersOnlyAttribute.Tests/PolySharp.PolySharpUseTypeAliasForUnmanagedCallersOnlyAttribute.Tests.csproj" />
11+
<Project Path="tests/PolySharp.Tests.UsePublicAccessibility/PolySharp.Tests.UsePublicAccessibility.csproj" />
1112
<Project Path="tests/PolySharp.Tests/PolySharp.Tests.csproj" />
1213
<Project Path="tests/PolySharp.TypeForwards.Tests/PolySharp.TypeForwards.Tests.csproj" />
1314
</Folder>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<!--
4+
This project mirrors 'PolySharp.Tests', just with 'PolySharpUsePublicAccessibilityForGeneratedTypes' set too.
5+
The point is to verify that the additional logic around '[Embedded]' works correctly when polyfills are public.
6+
Any changes to either of these two test projects should be kept in sync with the other one.
7+
-->
8+
<PropertyGroup>
9+
<TargetFrameworks>net472;net48;net481;netstandard2.0;netstandard2.1;net8.0;net9.0</TargetFrameworks>
10+
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
11+
<PolySharpUsePublicAccessibilityForGeneratedTypes>true</PolySharpUsePublicAccessibilityForGeneratedTypes>
12+
</PropertyGroup>
13+
14+
<ItemGroup>
15+
<CompilerVisibleProperty Include="PolySharpIncludeRuntimeSupportedAttributes" />
16+
<CompilerVisibleProperty Include="PolySharpUsePublicAccessibilityForGeneratedTypes" />
17+
</ItemGroup>
18+
19+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
20+
<PackageReference Include="System.Memory" Version="4.5.5" />
21+
</ItemGroup>
22+
23+
<ItemGroup>
24+
<ProjectReference Include="..\..\src\PolySharp.SourceGenerators\PolySharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
25+
</ItemGroup>
26+
27+
<ItemGroup>
28+
<Compile Include="..\PolySharp.Tests\LanguageFeatures.cs" Link="LanguageFeatures.cs" />
29+
<Compile Include="..\PolySharp.Tests\RuntimeSupport.cs" Link="RuntimeSupport.cs" />
30+
</ItemGroup>
31+
32+
</Project>

0 commit comments

Comments
 (0)