Skip to content

Commit 4405525

Browse files
committed
Make unit tests independent of the generator
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 47b98a2 commit 4405525

File tree

8 files changed

+15
-107
lines changed

8 files changed

+15
-107
lines changed

src/Generator.Tests/GeneratorTestFixture.cs

Lines changed: 0 additions & 89 deletions
This file was deleted.

tests/CLI/CLI.Tests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using CppSharp.Utils;
21
using NUnit.Framework;
32
using CLI;
43
using System.Text;
54
using System;
65

7-
public class CLITests : GeneratorTestFixture
6+
[TestFixture]
7+
public class CLITests
88
{
99
[Test]
1010
public void TestTypes()

tests/CSharp/CSharp.Tests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
using System.Linq;
44
using System.Reflection;
55
using System.Runtime.InteropServices;
6-
using System.Security;
7-
using System.Text;
8-
using CppSharp.Utils;
96
using CSharp;
107
using NUnit.Framework;
118

12-
public unsafe class CSharpTests : GeneratorTestFixture
9+
[TestFixture]
10+
public unsafe class CSharpTests
1311
{
1412
public class ExtendsWrapper : TestOverrideFromSecondaryBase
1513
{

tests/Common/Common.Tests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
using System;
22
using System.Reflection;
3-
using System.Runtime.InteropServices;
43
using CommonTest;
5-
using CppSharp.Utils;
64
using NUnit.Framework;
75
using Enum = CommonTest.Enum;
86

97
[TestFixture]
10-
public class CommonTests : GeneratorTestFixture
8+
public class CommonTests
119
{
1210
[Test]
1311
public unsafe void TestCodeGeneration()

tests/Encodings/Encodings.Tests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using CppSharp.Utils;
2-
using NUnit.Framework;
1+
using NUnit.Framework;
32
using Foo = Encodings.Foo;
43

5-
public class EncodingsTests : GeneratorTestFixture
4+
[TestFixture]
5+
public class EncodingsTests
66
{
77
[Test]
88
public void TestFoo()

tests/StandardLib/StandardLib.Tests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using CppSharp.Utils;
2-
using NUnit.Framework;
1+
using NUnit.Framework;
32
using System.Collections.Generic;
43
using System.IO;
54
using System.Linq;
65
using System.Runtime.InteropServices;
76
using StandardLib;
87

9-
public class StandardLibTests : GeneratorTestFixture
8+
[TestFixture]
9+
public class StandardLibTests
1010
{
1111
[Test]
1212
public void TestVectors()

tests/Test.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
</ItemGroup>
99

1010
<ItemGroup>
11-
<ProjectReference Include="$(SrcDir)Generator.Tests\CppSharp.Generator.Tests.csproj" />
1211
<ProjectReference Include="$(TestName).CSharp.csproj" Condition="$(MSBuildProjectName.EndsWith('CSharp'))" />
1312
<ProjectReference Include="$(NativeProjectsDir)$(TestName).Native.vcxproj" Condition="$(IsWindows)" ReferenceOutputAssembly="false" />
1413
<ProjectReference Include="$(NativeProjectsDir)$(TestName).CLI.vcxproj" Condition="$(MSBuildProjectName.EndsWith('CLI')) AND $(IsWindows)" />
1514
</ItemGroup>
1615

1716
<ItemGroup>
1817
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
18+
<PackageReference Include="NUnit" Version="3.11.0" />
19+
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
1920
</ItemGroup>
2021
</Project>

tests/VTables/VTables.Tests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using CppSharp.Utils;
32
using NUnit.Framework;
43
using VTables;
54

@@ -31,7 +30,8 @@ public override unsafe int RetInt()
3130
}
3231
}
3332

34-
public class VTablesTests : GeneratorTestFixture
33+
[TestFixture]
34+
public class VTablesTests
3535
{
3636
[Test]
3737
public void TestFoo()

0 commit comments

Comments
 (0)