Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Added LoadNativeTypeOffsetClass
  • Loading branch information
tminka committed Jan 1, 2021
commit f59e5d0e392dbba4e319c5c1a44ca33cb08f43fa
4 changes: 4 additions & 0 deletions src/embed_tests/Python.EmbeddingTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<None Include="fixtures/**/*.py" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<PropertyGroup>
<DefineConstants>$(DefineConstants);$(ConfiguredConstants)</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.*" />
<PackageReference Include="NUnit3TestAdapter" Version="3.*">
Expand Down
27 changes: 27 additions & 0 deletions src/embed_tests/TestNativeTypeOffset.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

using NUnit.Framework;

namespace Python.EmbeddingPythonTest
{
public class TestNativeTypeOffset
{
#if WINDOWS
// The code for NativeTypeOffset is not generated under Windows because sys.abiflags does not exist (see setup.py)
#else
/// <summary>
/// Tests that installation has generated code for NativeTypeOffset and that it can be loaded.
/// </summary>
[Test]
public void LoadNativeTypeOffsetClass()
{
new Python.Runtime.NativeTypeOffset();
}
#endif
}
}