Convert JIT/Performance to a merged test group (#85851)
authorMark Plesko <markples@microsoft.com>
Fri, 12 May 2023 21:04:01 +0000 (14:04 -0700)
committerGitHub <noreply@github.com>
Fri, 12 May 2023 21:04:01 +0000 (14:04 -0700)
See https://github.com/markples/utils/tree/for-PR-dotnet-runtime-85847-others for ILTransform tool.

* Manual removal of C# Main args
* [ILTransform -prociso] Set RequiresProcessIsolation when needed by other properties
* [ILTransform -public] Make test entrypoints accessible
* [ILTransform -ilfact] Main->TestEntryPoint, [Fact], remove OutputType=Exe
* Manual fixes for xUnit1013 - internal methods, disable for region
* Add merged group

202 files changed:
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees-2.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees-2.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees-5.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees-5.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees-6.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees-6.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fannkuch-redux/fannkuch-redux-2.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fannkuch-redux/fannkuch-redux-2.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fannkuch-redux/fannkuch-redux-5.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fannkuch-redux/fannkuch-redux-5.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fannkuch-redux/fannkuch-redux-9.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fannkuch-redux/fannkuch-redux-9.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fasta/fasta-1.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fasta/fasta-1.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fasta/fasta-2.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/fasta/fasta-2.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/k-nucleotide-1.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/k-nucleotide-1.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/k-nucleotide-9.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/k-nucleotide/k-nucleotide-9.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/mandelbrot/mandelbrot-2.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/mandelbrot/mandelbrot-2.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/mandelbrot/mandelbrot-7.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/mandelbrot/mandelbrot-7.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/n-body/n-body-3.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/n-body/n-body-3.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/pidigits/pidigits-3.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/pidigits/pidigits-3.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/regex-redux-1.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/regex-redux-1.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/regex-redux-5.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/regex-redux/regex-redux-5.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/reverse-complement-1.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/reverse-complement-1.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/reverse-complement-6.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/reverse-complement/reverse-complement-6.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm-1.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm-1.csproj
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm-3.cs
src/tests/JIT/Performance/CodeQuality/BenchmarksGame/spectralnorm/spectralnorm-3.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Adams/Adams.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Adams/Adams.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/BenchMk2/BenchMk2.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/BenchMk2/BenchMk2.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/BenchMrk/BenchMrk.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/BenchMrk/BenchMrk.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Bisect/Bisect.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Bisect/Bisect.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/DMath/DMath.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/DMath/DMath.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/FFT/FFT.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/FFT/FFT.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/InProd/InProd.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/InProd/InProd.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/InvMt/InvMt.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/InvMt/InvMt.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/LLoops/LLoops.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/LLoops/LLoops.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Lorenz/Lorenz.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Lorenz/Lorenz.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/MatInv4/MatInv4.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/MatInv4/MatInv4.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/NewtE/NewtE.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/NewtE/NewtE.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/NewtR/NewtR.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/NewtR/NewtR.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Regula/Regula.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Regula/Regula.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Romber/Romber.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Romber/Romber.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Secant/Secant.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Secant/Secant.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Simpsn/Simpsn.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Simpsn/Simpsn.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/SqMtx/SqMtx.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/SqMtx/SqMtx.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Trap/Trap.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Trap/Trap.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Whetsto/Whetsto.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchF/Whetsto/Whetsto.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/8Queens/8Queens.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/8Queens/8Queens.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Ackermann/Ackermann.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Ackermann/Ackermann.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/AddArray/AddArray.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/AddArray/AddArray.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/AddArray2/AddArray2.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/AddArray2/AddArray2.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Array1/Array1.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Array1/Array1.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Array2/Array2.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Array2/Array2.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/BenchE/BenchE.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/BenchE/BenchE.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/BubbleSort/BubbleSort.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/BubbleSort/BubbleSort.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/BubbleSort2/BubbleSort2.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/BubbleSort2/BubbleSort2.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/CSieve/CSieve.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/CSieve/CSieve.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Fib/Fib.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Fib/Fib.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/HeapSort/HeapSort.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/HeapSort/HeapSort.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/IniArray/IniArray.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/IniArray/IniArray.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/LogicArray/LogicArray.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/LogicArray/LogicArray.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Midpoint/Midpoint.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Midpoint/Midpoint.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/MulMatrix/MulMatrix.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/MulMatrix/MulMatrix.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/NDhrystone/NDhrystone.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/NDhrystone/NDhrystone.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Permutate/Permutate.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Permutate/Permutate.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Pi/Pi.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Pi/Pi.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Puzzle/Puzzle.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/Puzzle/Puzzle.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/QuickSort/QuickSort.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/QuickSort/QuickSort.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/TreeInsert/TreeInsert.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/TreeInsert/TreeInsert.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/TreeSort/TreeSort.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/TreeSort/TreeSort.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/XposMatrix/XposMatrix.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/BenchI/XposMatrix/XposMatrix.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDInProd/MDInProd.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDInProd/MDInProd.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDInvMt/MDInvMt.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDInvMt/MDInvMt.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDLLoops/MDLLoops.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDLLoops/MDLLoops.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDRomber/MDRomber.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDRomber/MDRomber.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDSqMtx/MDSqMtx.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchF/MDSqMtx/MDSqMtx.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDAddArray2/MDAddArray2.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDAddArray2/MDAddArray2.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDArray2/MDArray2.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDArray2/MDArray2.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDGeneralArray/MDGeneralArray.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDGeneralArray/MDGeneralArray.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDLogicArray/MDLogicArray.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDLogicArray/MDLogicArray.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDMidpoint/MDMidpoint.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDMidpoint/MDMidpoint.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDMulMatrix/MDMulMatrix.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDMulMatrix/MDMulMatrix.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDNDhrystone/MDNDhrystone.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDNDhrystone/MDNDhrystone.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDPuzzle/MDPuzzle.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDPuzzle/MDPuzzle.csproj
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDXposMatrix/MDXposMatrix.cs
src/tests/JIT/Performance/CodeQuality/Benchstones/MDBenchI/MDXposMatrix/MDXposMatrix.csproj
src/tests/JIT/Performance/CodeQuality/BilinearInterpol/BilinearInterpol.cs
src/tests/JIT/Performance/CodeQuality/BilinearInterpol/BilinearInterpol.csproj
src/tests/JIT/Performance/CodeQuality/Burgers/Burgers.cs
src/tests/JIT/Performance/CodeQuality/Burgers/Burgers.csproj
src/tests/JIT/Performance/CodeQuality/Bytemark/ByteMark.cs
src/tests/JIT/Performance/CodeQuality/Bytemark/Bytemark.csproj
src/tests/JIT/Performance/CodeQuality/Devirtualization/DefaultEqualityComparerPerf.cs
src/tests/JIT/Performance/CodeQuality/Devirtualization/DefaultEqualityComparerPerf.csproj
src/tests/JIT/Performance/CodeQuality/FractalPerf/FractalPerf.cs
src/tests/JIT/Performance/CodeQuality/FractalPerf/FractalPerf.csproj
src/tests/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/PacketTracer.csproj
src/tests/JIT/Performance/CodeQuality/HWIntrinsic/X86/PacketTracer/Program.cs
src/tests/JIT/Performance/CodeQuality/Inlining/InlineGCStruct.cs
src/tests/JIT/Performance/CodeQuality/Inlining/InlineGCStruct.csproj
src/tests/JIT/Performance/CodeQuality/Inlining/NoThrowInline.cs
src/tests/JIT/Performance/CodeQuality/Inlining/NoThrowInline.csproj
src/tests/JIT/Performance/CodeQuality/Layout/SearchLoops.cs
src/tests/JIT/Performance/CodeQuality/Layout/SearchLoops.csproj
src/tests/JIT/Performance/CodeQuality/Linq/Linq.cs
src/tests/JIT/Performance/CodeQuality/Linq/Linq.csproj
src/tests/JIT/Performance/CodeQuality/Math/Functions/Functions.cs
src/tests/JIT/Performance/CodeQuality/Math/Functions/Functions.csproj
src/tests/JIT/Performance/CodeQuality/Roslyn/CscBench.cs
src/tests/JIT/Performance/CodeQuality/Roslyn/CscBench.csproj
src/tests/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/ConsoleMandel.cs
src/tests/JIT/Performance/CodeQuality/SIMD/ConsoleMandel/ConsoleMandel.csproj
src/tests/JIT/Performance/CodeQuality/SIMD/RayTracer/RayTracer.csproj
src/tests/JIT/Performance/CodeQuality/SIMD/RayTracer/RayTracerBench.cs
src/tests/JIT/Performance/CodeQuality/SIMD/SeekUnroll/SeekUnroll.cs
src/tests/JIT/Performance/CodeQuality/SIMD/SeekUnroll/SeekUnroll.csproj
src/tests/JIT/Performance/CodeQuality/SciMark/CommandLine.cs
src/tests/JIT/Performance/CodeQuality/SciMark/SciMark.csproj
src/tests/JIT/Performance/CodeQuality/Serialization/Deserialize.cs
src/tests/JIT/Performance/CodeQuality/Serialization/Deserialize.csproj
src/tests/JIT/Performance/CodeQuality/Serialization/Serialize.cs
src/tests/JIT/Performance/CodeQuality/Serialization/Serialize.csproj
src/tests/JIT/Performance/CodeQuality/Span/Indexer.cs
src/tests/JIT/Performance/CodeQuality/Span/Indexer.csproj
src/tests/JIT/Performance/CodeQuality/Span/SpanBench.cs
src/tests/JIT/Performance/CodeQuality/Span/SpanBench.csproj
src/tests/JIT/Performance/CodeQuality/V8/Crypto/Crypto.cs
src/tests/JIT/Performance/CodeQuality/V8/Crypto/Crypto.csproj
src/tests/JIT/Performance/CodeQuality/V8/Richards/Richards.cs
src/tests/JIT/Performance/CodeQuality/V8/Richards/Richards.csproj
src/tests/JIT/Performance/Directory.Build.props [new file with mode: 0644]
src/tests/JIT/Performance/JIT.performance.csproj [new file with mode: 0644]

index 03d84e9..000aae0 100644 (file)
@@ -14,6 +14,8 @@
 */
 
 using System;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -21,10 +23,16 @@ namespace BenchmarksGame
     {
         const int minDepth = 4;
 
-        public static int Main(String[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = 0;
-            if (args.Length > 0) n = Int32.Parse(args[0]);
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public static int Test(int? arg)
+        {
+            int n = arg ?? 0;
 
             int check = Bench(n, true);
             int expected = 4398;
index b7e5156..45d7afc 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
+    <!-- Needed for GCStressIncompatible -->
+    <RequiresProcessIsolation>true</RequiresProcessIsolation>
     <GCStressIncompatible>true</GCStressIncompatible>
   </PropertyGroup>
   <PropertyGroup>
index 705dc7d..6fdd878 100644 (file)
@@ -18,6 +18,7 @@
 using System;
 using System.Runtime.CompilerServices;
 using System.Threading.Tasks;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -25,9 +26,16 @@ namespace BenchmarksGame
     {
         public const int MinDepth = 4;
 
-        public static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            var n = args.Length == 0 ? 0 : int.Parse(args[0]);
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public static int Test(int? arg)
+        {
+            var n = arg ?? 0;
 
             int check = Bench(n, true);
             int expected = 4398;
index b7e5156..45d7afc 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
+    <!-- Needed for GCStressIncompatible -->
+    <RequiresProcessIsolation>true</RequiresProcessIsolation>
     <GCStressIncompatible>true</GCStressIncompatible>
   </PropertyGroup>
   <PropertyGroup>
index 95bbeed..d3cae67 100644 (file)
@@ -15,6 +15,7 @@
 using System;
 using System.Runtime.CompilerServices;
 using System.Threading.Tasks;
+using Xunit;
 //using BenchmarkDotNet.Attributes;
 //using MicroBenchmarks;
 
@@ -33,9 +34,16 @@ namespace BenchmarksGame
         // 21 is used in official numbers; about 7.8s
         const int N = 18;
 
-        public static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            var n = args.Length == 0 ? 0 : int.Parse(args[0]);
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public static int Test(int? arg)
+        {
+            var n = arg ?? 0;
             int check = Bench(n, true);
 
             const int expected = 4398;
index b7e5156..45d7afc 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
+    <!-- Needed for GCStressIncompatible -->
+    <RequiresProcessIsolation>true</RequiresProcessIsolation>
     <GCStressIncompatible>true</GCStressIncompatible>
   </PropertyGroup>
   <PropertyGroup>
index 829bc21..85490ab 100644 (file)
@@ -13,6 +13,8 @@
 */
 
 using System;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -71,9 +73,16 @@ namespace BenchmarksGame
             } while (true);
         }
 
-        static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = (args.Length > 0) ? Int32.Parse(args[0]) : 7;
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 7;
             var fr2 = new FannkuchRedux_2();
             var pf = fr2.fannkuch(n);
             Console.Write("{0}\nPfannkuchen({1}) = {2}\n", pf[0], n, pf[1]);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index a374b15..f102e0f 100644 (file)
@@ -17,6 +17,7 @@
 using System;
 using System.Threading;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -98,9 +99,16 @@ namespace BenchmarksGame
             maxFlips[taskId] = maxflips;
         }
 
-        public static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = args.Length > 0 ? int.Parse(args[0]) : 7;
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 7;
             int sum = Bench(n, true);
 
             int expected = 16;
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 42eca5d..862dec2 100644 (file)
@@ -15,6 +15,7 @@ using System;
 using System.Linq;
 using System.Runtime.CompilerServices;
 using System.Threading;
+using Xunit;
 //using BenchmarkDotNet.Attributes;
 //using MicroBenchmarks;
 
@@ -23,9 +24,16 @@ namespace BenchmarksGame
     //[BenchmarkCategory(Categories.Runtime, Categories.BenchmarksGame, Categories.JIT)]
     public unsafe class FannkuchRedux_9
     {
-        public static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = args.Length > 0 ? int.Parse(args[0]) : 7;
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 7;
             int sum = Bench(n, true);
 
             int expected = 228;
index e737c06..f90b4b6 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
index c58992a..8460bda 100644 (file)
@@ -23,6 +23,7 @@ using System.Runtime.CompilerServices;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -35,9 +36,16 @@ namespace BenchmarksGame
         const int IC = 29573;
         static int seed = 42;
 
-        public static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = args.Length > 0 ? Int32.Parse(args[0]) : 1000;
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 1000;
 
             Bench(n, true);
             return 100;
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index bc20bcc..61b3780 100644 (file)
 
 using System;
 using System.IO;
+using System.Runtime.CompilerServices;
 using System.Text;
+using Xunit;
 
 namespace BenchmarksGame
 {
     public class Fasta_2
     {
-        static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = args.Length > 0 ? Int32.Parse(args[0]) : 1000;
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 1000;
 
             Bench(n, true);
             return 100;
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 03b5016..bafaa5e 100644 (file)
@@ -16,6 +16,7 @@ using System;
 using System.IO;
 using System.Collections.Generic;
 using System.Text;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -81,7 +82,8 @@ namespace BenchmarksGame
     public class KNucleotide_1
     {
 
-        public static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             var helpers = new TestHarnessHelpers(bigInput: false);
 
index a45b4f4..68b9707 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 21ecbbe..89659ef 100644 (file)
@@ -20,6 +20,7 @@ using System.Linq;
 using System.Collections.Generic;
 using System.Threading.Tasks;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -252,7 +253,8 @@ namespace BenchmarksGame
             return string.Concat(n.ToString(), "\t", fragment);
         }
 
-        public static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             var helpers = new TestHarnessHelpers(bigInput: false);
             bool ok = Bench(helpers, true);
index a45b4f4..68b9707 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 0d8f3f0..f6bca28 100644 (file)
 
 using System;
 using System.IO;
+using System.Runtime.CompilerServices;
 using System.Security.Cryptography;
+using Xunit;
 
 namespace BenchmarksGame
 {
     public class Mandelbrot_2
     {
-        public static int Main(String[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int width = 80;
-            if (args.Length > 0)
-                width = Int32.Parse(args[0]);
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int width = arg ?? 80;
 
             int lineLen = (width - 1) / 8 + 1;
             var bytes = new byte[width * lineLen];
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 72701b1..ebb72ac 100644 (file)
@@ -21,6 +21,7 @@ using System.Numerics;
 using System.Runtime.CompilerServices;
 using System.Security.Cryptography;
 using System.Threading.Tasks;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -82,9 +83,16 @@ namespace BenchmarksGame
             return (byte)(res ^ -1);
         }
 
-        public static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            var size = (args.Length > 0) ? int.Parse(args[0]) : 80;
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int size = arg ?? 80;
             var lineLength = size >> 3;
 
             var data = DoBench(size, lineLength);
index fca3c2b..5d0ad46 100644 (file)
@@ -1,6 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup>
index 478c710..7c54f16 100644 (file)
 */
 
 using System;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace BenchmarksGame
 {
     public class NBody_3
     {
-        public static int Main(String[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = args.Length > 0 ? Int32.Parse(args[0]) : 10000;
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 10000;
             bool success = Bench(n, true);
             return (success ? 100 : -1);
         }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 0471dc9..3d4fbb5 100644 (file)
@@ -19,7 +19,9 @@
 */
 using System;
 using System.Numerics;
+using System.Runtime.CompilerServices;
 using System.Text;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -121,9 +123,16 @@ namespace BenchmarksGame
             }
         }
 
-        public static int Main(String[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = (args.Length > 0 ? Int32.Parse(args[0]) : 10);
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 10;
             string result = Bench(n, true).ToString();
             if (result != "3141592653\t:10")
             {
@@ -139,4 +148,4 @@ namespace BenchmarksGame
             return m.lastBuf;
         }
     }
-}
\ No newline at end of file
+}
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 25b5aec..b367b74 100644 (file)
 using System;
 using System.IO;
 using System.Text.RegularExpressions;
+using Xunit;
 
 namespace BenchmarksGame
 {
     public class RegexRedux_1
     {
-        static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             var helpers = new TestHarnessHelpers(bigInput: false);
 
index 421f8d3..4ccc562 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 05c53e1..7fd68c8 100644 (file)
@@ -17,6 +17,7 @@ using System;
 using System.IO;
 using System.Threading.Tasks;
 using System.Text.RegularExpressions;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -36,7 +37,8 @@ namespace BenchmarksGame
             return r + " " + c;
         }
 
-        public static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             var helpers = new TestHarnessHelpers(bigInput: false);
 
index 421f8d3..4ccc562 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index c9b7450..a071691 100644 (file)
@@ -16,6 +16,7 @@ using System;
 using System.IO;
 using System.Collections.Generic;
 using System.Security.Cryptography;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -44,7 +45,8 @@ namespace BenchmarksGame
         const byte Gt = (byte)'>';
         const byte Lf = (byte)'\n';
 
-        static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             var helpers = new TestHarnessHelpers(bigInput: false);
             var outBytes = new byte[helpers.FileLength];
index a092e77..86e0871 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 26a44e8..9d5964c 100644 (file)
@@ -19,6 +19,7 @@ using System.Collections.Generic;
 using System.Collections.Concurrent;
 using System.Security.Cryptography;
 using System.Threading;
+using Xunit;
 
 namespace BenchmarksGame
 {
@@ -227,7 +228,8 @@ namespace BenchmarksGame
             }
         }
 
-        static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             var helpers = new TestHarnessHelpers(bigInput: false);
             var outBytes = new byte[helpers.FileLength];
index a092e77..86e0871 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index f3141be..181d2f8 100644 (file)
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace BenchmarksGame
 {
     public class SpectralNorm_1
     {
-        public static int Main(String[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = 100;
-            if (args.Length > 0) n = Int32.Parse(args[0]);
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 100;
 
             double norm = new SpectralNorm_1().Bench(n);
             Console.WriteLine("{0:f9}", norm);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index dd9f623..ea7010d 100644 (file)
@@ -17,15 +17,22 @@ using System;
 using System.Runtime.CompilerServices;
 using System.Threading;
 using System.Threading.Tasks;
+using Xunit;
 
 namespace BenchmarksGame
 {
     public class SpectralNorm_3
     {
-        public static int Main(String[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = 100;
-            if (args.Length > 0) n = Int32.Parse(args[0]);
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        static int Test(int? arg)
+        {
+            int n = arg ?? 100;
 
             double norm = Bench(n);
             Console.WriteLine("{0:f9}", norm);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 1d1673a..0277043 100644 (file)
@@ -7,6 +7,7 @@
 using System;
 using System.Runtime.CompilerServices;
 using System.Diagnostics;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -100,12 +101,18 @@ public static class Adams
         }
     }
 
-    [MethodImpl(MethodImplOptions.NoOptimization)]
-    public static int Main(string[] argv)
+    [Fact]
+    public static int TestEntryPoint()
     {
-        if (argv.Length > 0)
+        return Test(null);
+    }
+
+    [MethodImpl(MethodImplOptions.NoOptimization | MethodImplOptions.NoInlining)]
+    private static int Test(int? arg)
+    {
+        if (arg.HasValue)
         {
-            Iterations = Int32.Parse(argv[0]);
+            Iterations = (int)arg;
         }
 
         Stopwatch sw = Stopwatch.StartNew();
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index f274373..a3b0c4b 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -37,7 +38,8 @@ public static class BenchMk2
         return true;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 1844616..581fb31 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -36,7 +37,8 @@ public static class BenchMrk
         return true;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 841bf9f..a9739db 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -128,7 +129,8 @@ public static class Bisect
         }
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index de0e3a6..2b1af3d 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -79,7 +80,8 @@ public static class DMath
         return true;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench(Iterations);
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 3cf59a6..1b3c2ed 100644 (file)
@@ -6,6 +6,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -119,7 +120,8 @@ public static class FFT
         }
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 8e18e6b..83f3097 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -104,7 +105,8 @@ public static class InProd
         }
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 2797991..b5c13fb 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -107,7 +108,8 @@ public static class InvMt
         }
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 2ac114b..4f3a92b 100644 (file)
@@ -53,6 +53,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 
 namespace Benchstone.BenchF
@@ -614,7 +615,8 @@ public class LLoops
         }
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = (new LLoops()).Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index a221b40..e29b55a 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -104,7 +105,8 @@ public static class Lorenz
         return (x * y - (8.0 * z) / 3.0);
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 69a9e03..820954c 100644 (file)
@@ -3,6 +3,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -465,7 +466,8 @@ public static class MatInv4
         return;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 7b5d764..a16bfd0 100644 (file)
@@ -6,6 +6,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -105,7 +106,8 @@ public static class NewtE
         return (-(x));
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 4b85736..038863d 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -96,7 +97,8 @@ public static class NewtR
         iflag = 2;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 6b79b78..cf46692 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -158,7 +159,8 @@ public static class Regula
         }
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index ab6ce59..4396f69 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -139,7 +140,8 @@ public static class Romber
         return (System.Math.Exp((-(x)) * (x)));
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index e7362db..c067393 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -107,7 +108,8 @@ public static class Secant
         }
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index df7b9be..87d3982 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -63,7 +64,8 @@ public static class Simpsn
         return (System.Math.Exp((-(x)) * 2));
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 166166e..e61f204 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -73,7 +74,8 @@ public static class SqMtx
         }
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 574ba99..46f5216 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -66,7 +67,8 @@ public static class Trap
         return ((-2) * (x) * (F(x)));
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index bcfd2ad..2c71756 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchF
 {
@@ -212,7 +213,8 @@ public static class Whetsto
         e1[s_l] = e1[s_j];
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 1163ee7..2bfdec5 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -78,7 +79,8 @@ public static class EightQueens
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index f4e966e..8bb862a 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -45,7 +46,8 @@ public static class Ackermann
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index f0030db..9f40034 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -65,7 +66,8 @@ public static class AddArray
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index b917c7d..42bb7ae 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -103,7 +104,8 @@ public static class AddArray2
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 1a138e4..2d37fa3 100644 (file)
@@ -11,6 +11,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -127,7 +128,8 @@ public static class Array1
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 65e490c..9674ed6 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -75,7 +76,8 @@ public static class Array2
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = Bench(Iterations);
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 520820b..aac34f5 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -87,7 +88,8 @@ public static class BenchE
         return (s_position == 91);
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = Bench();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 77a5357..4af30b8 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -65,7 +66,8 @@ public static class BubbleSort
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index c5a03ed..af2fcba 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -68,7 +69,8 @@ public static class BubbleSort2
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index e1f9b98..31f00c9 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -60,7 +61,8 @@ public static class CSieve
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 544300c..5b80dad 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -41,7 +42,8 @@ public static class Fib
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 6831851..ca4ca02 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -99,7 +100,8 @@ public static class HeapSort
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 15a9790..f62ed3d 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -40,7 +41,8 @@ public static class IniArray
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index bc2f826..87d8e3c 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -75,7 +76,8 @@ public static class LogicArray
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 3f6bf76..e2a9016 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -84,7 +85,8 @@ public static class Midpoint
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 9f0eca2..8fbada7 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -120,7 +121,8 @@ public static class MulMatrix
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 088efab..60f5551 100644 (file)
@@ -9,6 +9,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -266,7 +267,8 @@ public static class NDhrystone
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index aaa55ed..f586300 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -91,7 +92,8 @@ public class Permutate
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index b871956..2b9f057 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -63,7 +64,8 @@ public static class Pi
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 70ab518..ab43c56 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -368,7 +369,8 @@ public class Puzzle
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index bc465bd..1756db2 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -94,7 +95,8 @@ public static class QuickSort
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 26edc32..cbf2ce7 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -110,7 +111,8 @@ public class TreeInsert
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 35ccb51..fa18e19 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -129,7 +130,8 @@ public static class TreeSort
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 3dffd4b..bf5752c 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.BenchI
 {
@@ -67,7 +68,8 @@ public static class XposMatrix
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 388ffbd..3cc66e6 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchF
 {
@@ -100,7 +101,8 @@ public static class MDInProd
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 3af86d8..071a697 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchF
 {
@@ -103,7 +104,8 @@ public static class MDInvMt
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index fbc5844..0f3c34c 100644 (file)
@@ -53,6 +53,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchF
 {
@@ -599,7 +600,8 @@ public class MDLLoops
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         var lloops = new MDLLoops();
         bool result = lloops.TestBase();
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 6db12f1..48007dd 100644 (file)
@@ -5,6 +5,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchF
 {
@@ -135,7 +136,8 @@ public static class MDRomber
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index e8ce716..87cf8f0 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchF
 {
@@ -69,7 +70,8 @@ public static class MDSqMtx
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index faa9285..a780893 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -93,7 +94,8 @@ public static class MDAddArray2
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index b61bc86..2d89168 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -67,7 +68,8 @@ public static class MDArray2
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index c26db42..412e04d 100644 (file)
@@ -2,6 +2,7 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -71,7 +72,8 @@ public static class MDGeneralArray
         return Bench(Iterations, s, d);
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = Test() && Test2();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 5de11b0..d11225e 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -67,7 +68,8 @@ public static class MDLogicArray
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index a111b09..b70ded7 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -76,7 +77,8 @@ public static class MDMidpoint
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 8d172c8..dedaf70 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -112,7 +113,8 @@ public static class MDMulMatrix
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index f2ee8a5..8f70927 100644 (file)
@@ -9,6 +9,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -258,7 +259,8 @@ public static class MDNDhrystone
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 231e6fe..7cfe1fa 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -357,7 +358,8 @@ public class MDPuzzle
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = TestBase();
         return (result ? 100 : -1);
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index c29ba00..9576a79 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Benchstone.MDBenchI
 {
@@ -59,7 +60,8 @@ public static class MDXposMatrix
         return result;
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         bool result = TestBase();
         return (result ? 100 : -1);
     }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 99ec698..248adb8 100644 (file)
@@ -12,6 +12,7 @@ using System.Numerics;
 using System.Runtime.Intrinsics;
 using System.Runtime.Intrinsics.X86;
 using System.Diagnostics;
+using Xunit;
 
 public class BilinearTest
 {
@@ -37,7 +38,7 @@ public class BilinearTest
     //ref values 
     double[] A, B, input, output;
 
-    public void Setup()
+    internal void Setup()
     {
         A = new double[lengthA];
         B = new double[lengthB];
@@ -288,7 +289,7 @@ public class BilinearTest
         return true;
     }
 
-    public void RunTests()
+    internal void RunTests()
     {
         Setup();
 
@@ -337,7 +338,8 @@ public class BilinearTest
             }
         }
     }
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         BilinearTest test = new BilinearTest();
         test.RunTests();
index e737c06..f90b4b6 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
index bd45830..08c4874 100644 (file)
@@ -11,6 +11,7 @@ using System;
 using System.Linq;
 using System.Numerics;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 public class Burgers
 {
@@ -162,7 +163,8 @@ public class Burgers
         return un;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         if (!Vector.IsHardwareAccelerated)
         {
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index a0f25ba..1e981ac 100644 (file)
@@ -32,6 +32,8 @@
 
 using System;
 using System.IO;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 internal class global
 {
@@ -260,10 +262,11 @@ public class ByteMark
     private static double[] s_bindex;
     private static HarnessTest[] s_tests;
 
-    public static int Main(string[] args)
+    [Fact]
+    public static int TestEntryPoint()
     {
         ByteMark app = new ByteMark();
-        int result = app.ExecuteCore(args);
+        int result = app.ExecuteCore(Array.Empty<string>());
         return result;
     }
 
@@ -1253,4 +1256,4 @@ public class ByteMark
         global.align = 8;
         global.write_to_file = false;
     }
-}
\ No newline at end of file
+}
index 1c1e8d3..03274a8 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
+    <!-- Needed for GCStressIncompatible, UnloadabilityIncompatible -->
+    <RequiresProcessIsolation>true</RequiresProcessIsolation>
     <GCStressIncompatible>true</GCStressIncompatible>
     <NoWarn>$(NoWarn);xUnit1013</NoWarn>
     <!-- This test takes a very long time when run with runincontext -->
index 46337e8..91870e7 100644 (file)
@@ -4,6 +4,7 @@
 using System;
 using System.Collections.Generic;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 // Performance tests for optimizations related to EqualityComparer<T>.Default
 
@@ -109,7 +110,8 @@ namespace Devirtualization
             BLUE = 2
         }
 
-        public static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             var valueTupleFixture = new EqualityComparerFixture<ValueTuple<byte, E, int>>();
             var v0 = new ValueTuple<byte, E, int>(3, E.RED, 11);
index 8597b72..058d09a 100644 (file)
@@ -1,7 +1,4 @@
 <Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
   <ItemGroup>
     <Compile Include="DefaultEqualityComparerPerf.cs" />
   </ItemGroup>
index 283f42d..faa10d9 100644 (file)
@@ -4,6 +4,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace FractalPerf
 {
@@ -148,7 +149,8 @@ namespace FractalPerf
             return result;
         }
 
-        public static int Main() {
+        [Fact]
+        public static int TestEntryPoint() {
             bool result = TestBase();
             return (result ? 100 : -1);
         }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 6f3a8ae..acdb1df 100644 (file)
@@ -1,6 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup>
index aa49e6a..8130587 100644 (file)
@@ -9,8 +9,9 @@ using System.Threading.Tasks;
 using System.Collections.Concurrent;
 using System.Runtime.Intrinsics;
 using System.Runtime.Intrinsics.X86;
+using Xunit;
 
-class Program
+public class Program
 {
 #if DEBUG
 
@@ -48,7 +49,8 @@ class Program
         _freeBuffers = new ObjectPool<int[]>(() => new int[_width * 3 * _height]); // Each pixel has 3 fields (RGB)
     }
 
-    static unsafe int Main()
+    [Fact]
+    public static unsafe int TestEntryPoint()
     {
         if (Avx2.IsSupported)
         {
index 86f7a4c..661c85e 100644 (file)
@@ -15,6 +15,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Inlining
 {
@@ -92,7 +93,8 @@ public class InlineGCStruct
         return (result == 22);
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool withFormat = WithFormatBase();
         bool withoutFormat = WithoutFormatBase();
index d2e324a..cb679a2 100644 (file)
@@ -1,7 +1,4 @@
 <Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
   <ItemGroup>
     <Compile Include="InlineGCStruct.cs" />
   </ItemGroup>
index 49f7839..97f76a8 100644 (file)
@@ -3,6 +3,7 @@
 
 using System;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Inlining
 {
@@ -49,7 +50,8 @@ public static class NoThrowInline
         return a.Length + b.Length + c.Length + d.Length;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         return (Bench("a", "bc", "def", "ghij") == 10) ? 100 : -1;
     }
index c56a3ec..cc196b4 100644 (file)
@@ -1,7 +1,4 @@
 <Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
   <ItemGroup>
     <Compile Include="NoThrowInline.cs" />
   </ItemGroup>
index e9652ad..80d7262 100644 (file)
@@ -2,6 +2,7 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 
 using System;
+using Xunit;
 
 // Test code taken directly from https://github.com/dotnet/runtime/issues/7474
 // Laying the loop's early return path in-line can cost 30% on this micro-benchmark.
@@ -10,7 +11,8 @@ namespace Layout
 {
     public unsafe class SearchLoops
     {
-        public static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             // Make sure equal strings compare as such
             if (!LoopReturn("hello", "hello") || !LoopGoto("goodbye", "goodbye"))
index f6ca1af..d923501 100644 (file)
@@ -1,6 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <ItemGroup>
index 1b31812..cc4fe3d 100644 (file)
@@ -5,6 +5,7 @@ using System;
 using System.Runtime.CompilerServices;
 using System.Collections.Generic;
 using System.Linq;
+using Xunit;
 
 public class Product
 {
@@ -401,7 +402,8 @@ public class LinqBenchmarks
     }
     #endregion
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         var tests = new LinqBenchmarks();
         bool result = tests.Bench();
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index ff528d6..7b0fba5 100644 (file)
@@ -4,6 +4,8 @@
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace Functions
 {
@@ -56,7 +58,14 @@ namespace Functions
             ["tanhsingle"] = MathTests.TanhSingleTest
         };
 
-        private static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
+        {
+            return Test(Array.Empty<string>());
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        private static int Test(string[] args)
         {
             var isPassing = true; var iterations = defaultIterations;
             ICollection<string> testsToRun = new HashSet<string>();
index fd450ee..944f5f4 100644 (file)
@@ -1,7 +1,4 @@
 <Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
   <ItemGroup>
     <Compile Include="Functions.cs" />
     <Compile Include="MathTests.cs" />
index bedc2f6..f434f83 100644 (file)
@@ -9,6 +9,7 @@ using System;
 using System.IO;
 using System.Linq;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 public static class CscBench
 {
@@ -98,7 +99,7 @@ public static class CscBench
     public static bool DataflowBench()
     {
         var text = @"
-class C {
+public class C {
     public void F(int x)
     {
         int a;
@@ -142,7 +143,8 @@ class C {
         return result;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         bool result = true;
         if (!FindMscorlib())
index 1c6bb21..37d4ba5 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
+    <!-- Needed for GCStressIncompatible, NativeAotIncompatible -->
+    <RequiresProcessIsolation>true</RequiresProcessIsolation>
     <GCStressIncompatible>true</GCStressIncompatible>
     <NoWarn>$(NoWarn);xUnit1013</NoWarn>
     <MonoAotIncompatible>true</MonoAotIncompatible>
index 3fdc7f2..c26093e 100644 (file)
@@ -4,6 +4,8 @@
 
 using System;
 using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace SIMD
 {
@@ -62,7 +64,14 @@ namespace SIMD
             Console.WriteLine("In benchmark mode, a larger set is computed but nothing is dumped.");
         }
 
-        private static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
+        {
+            return Test(Array.Empty<string>());
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        private static int Test(string[] args)
         {
             try
             {
index 58ba159..e4c5725 100644 (file)
@@ -1,6 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
     <NoWarn>$(NoWarn);xUnit1013</NoWarn>
   </PropertyGroup>
   <PropertyGroup>
index 627bcf0..08a1a69 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 70abf12..6770750 100644 (file)
@@ -10,6 +10,7 @@ using System.Diagnostics;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Collections.Concurrent;
+using Xunit;
 
 namespace SIMD
 {
@@ -113,7 +114,8 @@ public class RayTracerBench
         return true;
     }
 
-    public static int Main()
+    [Fact]
+    public static int TestEntryPoint()
     {
         var r = new RayTracerBench();
         bool result = r.Run();
index 0b4cdac..7faf4f9 100644 (file)
@@ -4,6 +4,7 @@
 using System;
 using System.Numerics;
 using System.Runtime.CompilerServices;
+using Xunit;
 
 public static class SeekUnroll
 {
@@ -95,8 +96,15 @@ public static class SeekUnroll
     // Set of indices to pass to Test(int)
     static int[] IndicesToTest = new int[] { 1, 3, 11, 19, 27 };
 
+    [Fact]
+    public static int TestEntryPoint()
+    {
+        return TestEntry(null);
+    }
+
     // Main method entrypoint runs the manual timer loop
-    public static int Main(string[] args)
+    [MethodImpl(MethodImplOptions.NoInlining)]
+    private static int TestEntry(int? arg)
     {
         int failures = 0;
 
@@ -108,14 +116,14 @@ public static class SeekUnroll
         }
 
         int manualLoopCount = 1;
-        if (args == null || args.Length == 0)
+        if (arg == null)
         {
             Console.WriteLine("Warning: no iteration count specified; defaulting to 1 iteration per case");
             Console.WriteLine("To use multiple iterations per case, pass the desired number of iterations as the first command-line argument to this test");
         }
         else
         {
-            manualLoopCount = int.Parse(args[0]);
+            manualLoopCount = (int)arg;
         }
 
         foreach(int index in IndicesToTest)
index 570644f..197767e 100644 (file)
@@ -1,7 +1,4 @@
 <Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(MSBuildProjectName).cs" />
   </ItemGroup>
index 180e0d8..927b5f6 100644 (file)
@@ -13,6 +13,8 @@
 
 
 using System;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace SciMark2
 {
@@ -25,11 +27,18 @@ namespace SciMark2
 
     public class CommandLine
     {
+        [Fact]
+        public static int TestEntryPoint()
+        {
+            return Test(Array.Empty<string>());
+        }
+
         /// <summary>
         ///  Benchmark 5 kernels with individual Mflops.
         ///  "results[0]" has the average Mflop rate.
         /// </summary>
-        public static int Main(System.String[] args)
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public static int Test(System.String[] args)
         {
 #if DEBUG
             double min_time = Constants.RESOLUTION_TINY;
index f72a6e3..8ed4b91 100644 (file)
@@ -1,6 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
     <NoWarn>$(NoWarn);xUnit1013</NoWarn>
   </PropertyGroup>
   <PropertyGroup>
index 8372b33..13952a7 100644 (file)
@@ -9,6 +9,7 @@ using System.Runtime.Serialization;
 using System.Runtime.Serialization.Json;
 using System.Text;
 using Newtonsoft.Json.Bson;
+using Xunit;
 
 namespace Serialization
 {
@@ -149,7 +150,8 @@ public class JsonBenchmarks
         }
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         var tests = new JsonBenchmarks();
         bool result = tests.Deserialize();
         return result ? 100 : -1;
index 66d65f6..2ed8d42 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index d61f413..dc769ba 100644 (file)
@@ -8,6 +8,7 @@ using System.Runtime.CompilerServices;
 using System.Runtime.Serialization;
 using System.Runtime.Serialization.Json;
 using Newtonsoft.Json.Bson;
+using Xunit;
 
 namespace Serialization
 {
@@ -137,7 +138,8 @@ public class JsonBenchmarks
         }
     }
 
-    public static int Main() {
+    [Fact]
+    public static int TestEntryPoint() {
         var tests = new JsonBenchmarks();
         bool result = tests.Serialize();
         return result ? 100 : -1;
index 839bbc8..11d74d4 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 90374a4..0c5e2f1 100644 (file)
@@ -7,6 +7,7 @@ using System.Diagnostics;
 using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
+using Xunit;
 
 namespace Span
 {
@@ -927,7 +928,14 @@ namespace Span
             Console.WriteLine();
         }
 
-        public static int Main(string[] args)
+        [Fact]
+        public static int TestEntryPoint()
+        {
+            return Test(Array.Empty<string>());
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        public static int Test(string[] args)
         {
             if (args.Length > 0)
             {
index fdcf488..2afb150 100644 (file)
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <!-- Always try to use latest Roslyn compiler -->
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
     <NoWarn>$(NoWarn);xUnit1013</NoWarn>
   </PropertyGroup>
   <PropertyGroup>
index 1f0a477..2db0a1a 100644 (file)
@@ -7,6 +7,9 @@ using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using System.Text;
+using Xunit;
+
+#pragma warning disable xUnit1013
 
 namespace Span
 {
@@ -1074,7 +1077,8 @@ namespace Span
         #endregion // TestSpanAPIs
 
 
-        public static int Main()
+        [Fact]
+        public static int TestEntryPoint()
         {
             // Now simulate xunit-perf's benchmark discovery so we know what tests to invoke
             TypeInfo t = typeof(SpanBench).GetTypeInfo();
@@ -1109,3 +1113,5 @@ namespace Span
         }
     }
 }
+
+#pragma warning restore xUnit1013
index 15733c0..9d00693 100644 (file)
@@ -1,9 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <!-- Always try to use latest Roslyn compiler -->
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
index 40db8c9..567d75d 100644 (file)
@@ -40,6 +40,8 @@
 using System;
 using System.Collections.Generic;
 using System.Globalization;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace V8.Crypto
 {
@@ -47,29 +49,17 @@ namespace V8.Crypto
     {
         private const string INPUT = "The quick brown fox jumped over the extremely lazy frogs!";
 
-        public static int Main(String[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = 1;
-
-            if (args.Length > 0)
-            {
-                n = Int32.Parse(args[0]);
-            }
-
-            bool verbose = false;
+            return Test(null, false);
+        }
 
-            if (args.Length > 1)
-            {
-                switch (args[1])
-                {
-                    case "verbose":
-                        verbose = true;
-                        break;
-                    default:
-                        Console.WriteLine("Bad arg: '{0}'.\n", args[1]);
-                        return -1;
-                }
-            }
+        // Main method entrypoint runs the manual timer loop
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        private static int Test(int? iters, bool verbose)
+        {
+            int n = iters ?? 1;
 
             Measure(n, verbose);
 
index 447625e..2e3a8f0 100644 (file)
@@ -1,6 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
     <NoWarn>$(NoWarn);xUnit1013</NoWarn>
   </PropertyGroup>
   <PropertyGroup>
index 0ea8a55..2a97fb3 100644 (file)
@@ -10,6 +10,8 @@
 #define INTF_FOR_TASK
 
 using System;
+using System.Runtime.CompilerServices;
+using Xunit;
 
 namespace V8.Richards
 {
@@ -98,13 +100,16 @@ namespace V8.Richards
 
         public const int DATA_SIZE = 4;
 
-        public static int Main(String[] args)
+        [Fact]
+        public static int TestEntryPoint()
         {
-            int n = 1;
-            if (args.Length > 0)
-            {
-                n = Int32.Parse(args[0]);
-            }
+            return Test(null);
+        }
+
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        private static int Test(int? arg)
+        {
+            int n = arg ?? 1;
             bool result = Measure(n);
             return (result ? 100 : -1);
         }
index 0a051a8..c70b483 100644 (file)
@@ -1,8 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Exe</OutputType>
-  </PropertyGroup>
-  <PropertyGroup>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
   </PropertyGroup>
diff --git a/src/tests/JIT/Performance/Directory.Build.props b/src/tests/JIT/Performance/Directory.Build.props
new file mode 100644 (file)
index 0000000..689ebf8
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+  <Import Project="..\..\Directory.Merged.props" />
+  <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
+
+  <PropertyGroup>
+    <RunAnalyzers>true</RunAnalyzers>
+    <EnableNETAnalyzers>false</EnableNETAnalyzers>
+  </PropertyGroup>
+</Project>
diff --git a/src/tests/JIT/Performance/JIT.performance.csproj b/src/tests/JIT/Performance/JIT.performance.csproj
new file mode 100644 (file)
index 0000000..f751282
--- /dev/null
@@ -0,0 +1,7 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <ItemGroup>
+    <MergedWrapperProjectReference Include="*/**/*.??proj" />
+  </ItemGroup>
+
+  <Import Project="$(TestSourceDir)MergedTestRunner.targets" />
+</Project>