Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ bld/
[Oo]bj/
[Ll]og/
[Ll]ogs/
[Gg]en/

# Visual Studio 2015/2017 cache/options directory
.vs/
Expand Down
3 changes: 3 additions & 0 deletions Monkeymoto.NativeGenericDelegates.Tests/MSTestSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<Project Sdk="MSTest.Sdk/3.5.1">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CompilerGeneratedFilesOutputPath>gen</CompilerGeneratedFilesOutputPath>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<ImplicitUsings>disable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<InvariantGlobalization>true</InvariantGlobalization>
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Monkeymoto.NativeGenericDelegates</InterceptorsPreviewNamespaces>
<!--
Displays error on console in addition to the log file. Note that this feature comes with a performance impact.
For more information, visit https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test#show-failure-per-test
-->
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>$(DefineConstants);UNSAFE</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>$(DefineConstants);UNSAFE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<None Remove=".gitignore" />
<None Remove=".gitmodules" />
</ItemGroup>

<ItemGroup>
<Compile Remove="gen\**" />
<EmbeddedResource Remove="gen\**" />
<None Remove="gen\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Monkeymoto.NativeGenericDelegates.csproj">
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.11.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="17.12.6" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="1.4.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.Analyzers" Version="3.6.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.TestAdapter" Version="3.6.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="MSTest.TestFramework" Version="3.6.1" />
</ItemGroup>

</Project>
14 changes: 14 additions & 0 deletions Monkeymoto.NativeGenericDelegates.Tests/Tests.Marshallers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Runtime.InteropServices;

namespace Monkeymoto.NativeGenericDelegates.Tests
{
public sealed unsafe partial class Tests
{
internal readonly struct DefaultMarshaller : IMarshaller<DefaultMarshaller> { }

internal readonly struct CdeclMarshaller : IMarshaller<CdeclMarshaller>
{
static CallingConvention? IMarshaller<CdeclMarshaller>.CallingConvention => CallingConvention.Cdecl;
}
}
}
Loading