Add NUnit test chassis and Powershelll test generator scripts

This commit is contained in:
Katy Coe
2019-10-21 00:28:52 +02:00
parent 982b4b168d
commit 5f26b2d6f0
11 changed files with 149268 additions and 4 deletions

View File

@@ -0,0 +1,33 @@
# Copyright 2019 Katy Coe - http://www.hearthcode.org - http://www.djkaty.com
# All rights reserved.
# Generate Tests.cs
$testGen = "$PSScriptRoot/Tests.cs"
$bin = "$PSScriptRoot/TestBinaries"
echo @"
// THIS FILE IS AUTO-GENERATED BY GENERATE-TESTS.PS1
// DO NOT EDIT
using NUnit.Framework;
namespace Il2CppInspector
{
public partial class TestRunner
{
"@ > $testGen
gci $bin | % {
echo @"
[Test]
public void $($_.Name.Replace("-","_").Replace(" ","_").Replace(".","_"))() {
runTest(@"$($_.FullName)");
}
"@ >> $testGen
}
echo @"
}
}
"@ >> $testGen