Remove obsolete files

This commit is contained in:
TSR Berry 2023-07-16 04:58:46 +02:00
parent 8b2e3e4849
commit 9ddb42c170
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
5 changed files with 0 additions and 487 deletions

View file

@ -1,340 +0,0 @@
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using Xunit;
namespace Ryujinx.Tests
{
public class MatrixTheoryData<T1, T2, T3> : TheoryData<T1, T2, T3>
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
Add(t1, t2, t3);
}
}
}
}
}
public class MatrixTheoryData<T1, T2, T3, T4> : TheoryData<T1, T2, T3, T4>
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3, IEnumerable<T4> data4)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
Contract.Assert(data4 != null && data4.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
foreach (T4 t4 in data4)
{
Add(t1, t2, t3, t4);
}
}
}
}
}
}
public class MatrixTheoryData<T1, T2, T3, T4, T5> : TheoryData<T1, T2, T3, T4, T5>
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3, IEnumerable<T4> data4, IEnumerable<T5> data5)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
Contract.Assert(data4 != null && data4.Any());
Contract.Assert(data5 != null && data5.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
foreach (T4 t4 in data4)
{
foreach (T5 t5 in data5)
{
Add(t1, t2, t3, t4, t5);
}
}
}
}
}
}
}
public class MatrixTheoryData<T1, T2, T3, T4, T5, T6> : TheoryData<T1, T2, T3, T4, T5, T6>
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3, IEnumerable<T4> data4, IEnumerable<T5> data5, IEnumerable<T6> data6)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
Contract.Assert(data4 != null && data4.Any());
Contract.Assert(data5 != null && data5.Any());
Contract.Assert(data6 != null && data6.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
foreach (T4 t4 in data4)
{
foreach (T5 t5 in data5)
{
foreach (T6 t6 in data6)
{
Add(t1, t2, t3, t4, t5, t6);
}
}
}
}
}
}
}
}
public class MatrixTheoryData<T1, T2, T3, T4, T5, T6, T7> : TheoryData<T1, T2, T3, T4, T5, T6, T7>
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3, IEnumerable<T4> data4, IEnumerable<T5> data5, IEnumerable<T6> data6, IEnumerable<T7> data7)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
Contract.Assert(data4 != null && data4.Any());
Contract.Assert(data5 != null && data5.Any());
Contract.Assert(data6 != null && data6.Any());
Contract.Assert(data7 != null && data7.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
foreach (T4 t4 in data4)
{
foreach (T5 t5 in data5)
{
foreach (T6 t6 in data6)
{
foreach (T7 t7 in data7)
{
Add(t1, t2, t3, t4, t5, t6, t7);
}
}
}
}
}
}
}
}
}
public class MatrixTheoryData<T1, T2, T3, T4, T5, T6, T7, T8> : TheoryData<T1, T2, T3, T4, T5, T6, T7, T8>
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3, IEnumerable<T4> data4, IEnumerable<T5> data5, IEnumerable<T6> data6, IEnumerable<T7> data7, IEnumerable<T8> data8)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
Contract.Assert(data4 != null && data4.Any());
Contract.Assert(data5 != null && data5.Any());
Contract.Assert(data6 != null && data6.Any());
Contract.Assert(data7 != null && data7.Any());
Contract.Assert(data8 != null && data8.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
foreach (T4 t4 in data4)
{
foreach (T5 t5 in data5)
{
foreach (T6 t6 in data6)
{
foreach (T7 t7 in data7)
{
foreach (T8 t8 in data8)
{
Add(t1, t2, t3, t4, t5, t6, t7, t8);
}
}
}
}
}
}
}
}
}
}
public class MatrixTheoryData<T1, T2, T3, T4, T5, T6, T7, T8, T9> : TheoryData<T1, T2, T3, T4, T5, T6, T7, T8, T9>
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3, IEnumerable<T4> data4, IEnumerable<T5> data5, IEnumerable<T6> data6, IEnumerable<T7> data7, IEnumerable<T8> data8, IEnumerable<T9> data9)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
Contract.Assert(data4 != null && data4.Any());
Contract.Assert(data5 != null && data5.Any());
Contract.Assert(data6 != null && data6.Any());
Contract.Assert(data7 != null && data7.Any());
Contract.Assert(data8 != null && data8.Any());
Contract.Assert(data9 != null && data9.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
foreach (T4 t4 in data4)
{
foreach (T5 t5 in data5)
{
foreach (T6 t6 in data6)
{
foreach (T7 t7 in data7)
{
foreach (T8 t8 in data8)
{
foreach (T9 t9 in data9)
{
Add(t1, t2, t3, t4, t5, t6, t7, t8, t9);
}
}
}
}
}
}
}
}
}
}
}
public class MatrixTheoryData<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> : TheoryData<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3, IEnumerable<T4> data4, IEnumerable<T5> data5, IEnumerable<T6> data6, IEnumerable<T7> data7, IEnumerable<T8> data8, IEnumerable<T9> data9, IEnumerable<T10> data10)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
Contract.Assert(data4 != null && data4.Any());
Contract.Assert(data5 != null && data5.Any());
Contract.Assert(data6 != null && data6.Any());
Contract.Assert(data7 != null && data7.Any());
Contract.Assert(data8 != null && data8.Any());
Contract.Assert(data9 != null && data9.Any());
Contract.Assert(data10 != null && data10.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
foreach (T4 t4 in data4)
{
foreach (T5 t5 in data5)
{
foreach (T6 t6 in data6)
{
foreach (T7 t7 in data7)
{
foreach (T8 t8 in data8)
{
foreach (T9 t9 in data9)
{
foreach (T10 t10 in data10)
{
Add(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
}
}
}
}
}
}
}
}
}
}
}
}
public class MatrixTheoryData<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> : TheoryData
{
public MatrixTheoryData(IEnumerable<T1> data1, IEnumerable<T2> data2, IEnumerable<T3> data3, IEnumerable<T4> data4, IEnumerable<T5> data5, IEnumerable<T6> data6, IEnumerable<T7> data7, IEnumerable<T8> data8, IEnumerable<T9> data9, IEnumerable<T10> data10, IEnumerable<T11> data11)
{
Contract.Assert(data1 != null && data1.Any());
Contract.Assert(data2 != null && data2.Any());
Contract.Assert(data3 != null && data3.Any());
Contract.Assert(data4 != null && data4.Any());
Contract.Assert(data5 != null && data5.Any());
Contract.Assert(data6 != null && data6.Any());
Contract.Assert(data7 != null && data7.Any());
Contract.Assert(data8 != null && data8.Any());
Contract.Assert(data9 != null && data9.Any());
Contract.Assert(data10 != null && data10.Any());
Contract.Assert(data11 != null && data11.Any());
foreach (T1 t1 in data1)
{
foreach (T2 t2 in data2)
{
foreach (T3 t3 in data3)
{
foreach (T4 t4 in data4)
{
foreach (T5 t5 in data5)
{
foreach (T6 t6 in data6)
{
foreach (T7 t7 in data7)
{
foreach (T8 t8 in data8)
{
foreach (T9 t9 in data9)
{
foreach (T10 t10 in data10)
{
foreach (T11 t11 in data11)
{
AddRow(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11);
}
}
}
}
}
}
}
}
}
}
}
}
}
}

View file

@ -1,53 +0,0 @@
using System;
using System.Collections.Generic;
namespace Ryujinx.Tests
{
public static class RandomUtils
{
public static bool NextBool(this Random random)
{
return random.Next(2) == 1;
}
public static uint NextUShort(this Random random)
{
return (uint)random.Next(ushort.MaxValue);
}
public static uint NextUInt(this Random random)
{
return (uint)random.NextInt64(uint.MaxValue);
}
public static uint NextUInt(this Random random, uint to)
{
return (uint)random.NextInt64(to);
}
public static ulong NextULong(this Random random)
{
byte[] buffer = new byte[8];
random.NextBytes(buffer);
return BitConverter.ToUInt64(buffer);
}
public static byte NextByte(this Random random, byte from, byte to)
{
return (byte)random.Next(from, to);
}
public static IEnumerable<uint> NextUIntEnumerable(this Random random, int count)
{
List<uint> list = new();
for (int i = 0; i < count; i++)
{
list.Add(random.NextUInt());
}
return list.AsReadOnly();
}
}
}

View file

@ -1,16 +0,0 @@
using System.Numerics;
using Xunit;
namespace Ryujinx.Tests
{
public class RangeTheoryData<T> : TheoryData<T> where T : INumber<T>
{
public RangeTheoryData(T from, T to, T step)
{
for (T i = from; i <= to; i += step)
{
Add(i);
}
}
}
}

View file

@ -1,20 +0,0 @@
using System.Collections.Generic;
using System.Numerics;
namespace Ryujinx.Tests
{
public static class RangeUtils
{
public static List<T> RangeData<T>(T from, T to, T step) where T : INumber<T>
{
List<T> data = new();
for (T i = from; i <= to; i += step)
{
data.Add(i);
}
return data;
}
}
}

View file

@ -1,58 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Xunit;
namespace Ryujinx.Tests
{
public class StaticTheoryData : TheoryData
{
public StaticTheoryData(params object[] data)
{
List<int> indices = new();
int length = -1;
for (int i = 0; i < data.Length; i++)
{
if (data[i] is IList { Count: > 0 } list)
{
indices.Add(i);
if (length == -1)
{
length = list.Count;
}
else if (length != list.Count)
{
throw new NotImplementedException($"{nameof(StaticTheoryData)} currently only works with lists of the same size. (expected: {length}, actual: {list.Count})");
}
}
}
if (indices.Count == 0)
{
AddRow(data);
return;
}
for (int i = 0; i < length; i++)
{
object[] row = new object[data.Length];
for (int j = 0; j < data.Length; j++)
{
if (indices.Contains(j) && data[j] is IList list)
{
row[j] = list[i];
}
else
{
row[j] = data[j];
}
}
AddRow(row);
}
}
}
}