39 lines
794 B
PowerShell
39 lines
794 B
PowerShell
# Copyright 2019-2020 Katy Coe - http://www.djkaty.com - https://github.com/djkaty
|
|
# 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 | % {
|
|
$loadOptionsFile = "$($_.FullName)\loadoptions.txt"
|
|
$loadOptions = ""
|
|
if (Test-Path $loadOptionsFile -PathType Leaf) {
|
|
$loadOptions = cat $loadOptionsFile
|
|
}
|
|
echo @"
|
|
[Test]
|
|
public void $($_.Name -Replace '\W','_')() {
|
|
runTest(@"$($_.FullName)", new LoadOptions { $loadOptions });
|
|
}
|
|
|
|
"@ >> $testGen
|
|
}
|
|
|
|
echo @"
|
|
}
|
|
}
|
|
"@ >> $testGen |