Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert JIT/SIMD to a merged test group #85852

Merged
merged 8 commits into from
May 12, 2023
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/AbsGeneric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
using System;
using System.Collections.Generic;
using System.Numerics;
using Xunit;

namespace VectorMathTests
{
class Program
public class Program
{
const float EPS = Single.Epsilon * 5;

Expand All @@ -20,7 +21,8 @@ static short[] GenerateArray(int size, short value)
return arr;
}

static int Main()
[Fact]
public static int TestEntryPoint()
{
short[] arr = GenerateArray(60, 5);
var a = new System.Numerics.Vector<short>(arr);
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/AbsGeneric_r.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize />
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/AbsGeneric_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/AbsSqrt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
using System.Collections.Generic;
using System.Numerics;
using Point = System.Numerics.Vector4;
using Xunit;

namespace VectorMathTests
{
class Program
public class Program
{
static int Main()
[Fact]
public static int TestEntryPoint()
{
Point a = new Point(11, 13, 8, 4);
Point b = new Point(11, 13, 2, 1);
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/AbsSqrt_r.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize />
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/AbsSqrt_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/AddingSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
using System;
using System.Collections.Generic;
using Point = System.Numerics.Vector2;
using Xunit;

namespace VectorMathTests
{
class Program
public class Program
{
const float EPS = Single.Epsilon * 5;

Expand Down Expand Up @@ -41,7 +42,8 @@ static int Adds()
return 100;
}

static int Main()
[Fact]
public static int TestEntryPoint()
{
Point a = new Point(0, 0), b = new Point(1, 0);
Point c = a + b;
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/AddingSequence_r.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize />
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/AddingSequence_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/BitwiseOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
using System;
using System.Collections.Generic;
using Point = System.Numerics.Vector2;
using Xunit;

namespace VectorMathTests
{
class Program
public class Program
{
public const int DefaultSeed = 20010415;
public static int Seed = Environment.GetEnvironmentVariable("CORECLR_SEED") switch
Expand Down Expand Up @@ -108,7 +109,8 @@ static int TestBool()
return 100;
}

static int Main()
[Fact]
public static int TestEntryPoint()
{
if (TestDouble() != 100)
{
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/BitwiseOperations_r.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize />
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/BitwiseOperations_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/BoxUnbox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
using System;
using System.Collections.Generic;
using System.Numerics;
using Xunit;

namespace VectorMathTests
{
class Program
public class Program
{
static int Main()
[Fact]
public static int TestEntryPoint()
{
{
var a = new System.Numerics.Vector<int>(1);
Expand Down
1 change: 0 additions & 1 deletion src/tests/JIT/SIMD/BoxUnbox_r.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/BoxUnbox_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/BugWithAVX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Numerics;
using Xunit;

namespace VectorMathTests
{
class Program
public class Program
{
static int Main()
[Fact]
public static int TestEntryPoint()
{
int Count = System.Numerics.Vector<int>.Count;
return 100;
Expand Down
1 change: 0 additions & 1 deletion src/tests/JIT/SIMD/BugWithAVX_r.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion src/tests/JIT/SIMD/BugWithAVX_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/CircleInConvex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Numerics;

using Point = System.Numerics.Vector2;
using Xunit;


namespace ClassLibrary
Expand Down Expand Up @@ -51,7 +52,7 @@ static public float max(float a, float b)
return a > b ? a : b;
}

static public void swap(ref float a, ref float b)
static internal void swap(ref float a, ref float b)
{
float c = a;
a = b;
Expand Down Expand Up @@ -242,7 +243,8 @@ static float NextFloat(Random random)
return (float)(mantissa * exponent);
}

static int Main()
[Fact]
public static int TestEntryPoint()
{
List<Point> points = new List<Point>();
Random random = new Random(13);
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/CircleInConvex_r.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize />
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/CircleInConvex_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/CreateGeneric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
using System;
using System.Collections.Generic;
using System.Numerics;
using Xunit;

namespace VectorMathTests
{
class Program
public class Program
{
const float EPS = Single.Epsilon * 5;

static int Main()
[Fact]
public static int TestEntryPoint()
{
var a = new System.Numerics.Vector<short>(51);
for (int i = 0; i < System.Numerics.Vector<short>.Count; ++i)
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/CreateGeneric_r.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize />
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/CreateGeneric_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
6 changes: 4 additions & 2 deletions src/tests/JIT/SIMD/CtorFromArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
using System;
using System.Collections.Generic;
using Point = System.Numerics.Vector<int>;
using Xunit;

namespace VectorMathTests
{
class Program
public class Program
{
static int[] GenerateArray(int size, int value)
{
Expand All @@ -18,7 +19,8 @@ static int[] GenerateArray(int size, int value)
return arr;
}

static int Main()
[Fact]
public static int TestEntryPoint()
{
int v = 2;
int[] arr = GenerateArray(20, v);
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/CtorFromArray_r.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize />
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/CtorFromArray_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
8 changes: 5 additions & 3 deletions src/tests/JIT/SIMD/Ctors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
using System;
using System.Collections.Generic;
using System.Numerics;
using Xunit;

internal partial class VectorTest
public partial class VectorTest
{
private const int Pass = 100;
private const int Fail = -1;

class Program
public class Program
{
const float EPS = Single.Epsilon * 5;

Expand Down Expand Up @@ -70,7 +71,8 @@ static int Vector4Ctors()
return 100;
}

static int Main()
[Fact]
public static int TestEntryPoint()
{
int returnVal = Pass;

Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/Ctors_r.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize />
Expand Down
3 changes: 0 additions & 3 deletions src/tests/JIT/SIMD/Ctors_ro.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
Expand Down
Loading