Add NUnit test chassis and Powershelll test generator scripts
This commit is contained in:
33
Il2CppTests/generate-tests.ps1
Normal file
33
Il2CppTests/generate-tests.ps1
Normal 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
|
||||
Reference in New Issue
Block a user