Files
Il2CppInspectorRedux/Il2CppTests/generate-tests.ps1
2020-06-20 10:17:48 +02:00

34 lines
592 B
PowerShell

# 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
{
[Parallelizable(ParallelScope.Children)]
public partial class TestRunner
{
"@ > $testGen
gci -Directory $bin | % {
echo @"
[Test]
public void $($_.Name -Replace '\W','_')() {
runTest(@"$($_.FullName)");
}
"@ >> $testGen
}
echo @"
}
}
"@ >> $testGen