Removed unused class

This commit is contained in:
Thorsten Sommer 2020-08-04 17:10:34 +02:00
parent ed9143f240
commit 7e00a48e67

View File

@ -9,10 +9,8 @@ using NUnit.Framework;
namespace ExaArrayTests namespace ExaArrayTests
{ {
public class ExaArray1DTests
{
[ExcludeFromCodeCoverage] [ExcludeFromCodeCoverage]
public class InfinityArrayTests public class ExaArray1DTests
{ {
private class TestClass private class TestClass
{ {
@ -83,9 +81,9 @@ namespace ExaArrayTests
{ {
const uint MAX = 1_073_741_824; const uint MAX = 1_073_741_824;
var exaA = new ExaArray1D<byte>(Strategy.MAX_PERFORMANCE); var exaA = new ExaArray1D<byte>(Strategy.MAX_PERFORMANCE);
exaA.Extend(MAX-2); exaA.Extend(MAX - 2);
Assert.That(exaA.Length, Is.EqualTo(MAX-2)); Assert.That(exaA.Length, Is.EqualTo(MAX - 2));
exaA.Extend(2); exaA.Extend(2);
Assert.That(exaA.Length, Is.EqualTo(MAX)); Assert.That(exaA.Length, Is.EqualTo(MAX));
@ -272,10 +270,7 @@ namespace ExaArrayTests
var next = ExaArray1D<byte>.CreateFrom(exPerf); var next = ExaArray1D<byte>.CreateFrom(exPerf);
Assert.That(next.Length, Is.EqualTo(exPerf.Length)); Assert.That(next.Length, Is.EqualTo(exPerf.Length));
Assert.DoesNotThrow(() => Assert.DoesNotThrow(() => { next[4_999_999_999] = 0xab; });
{
next[4_999_999_999] = 0xab;
});
exPerf = null; exPerf = null;
next = null; next = null;
@ -285,10 +280,7 @@ namespace ExaArrayTests
next = ExaArray1D<byte>.CreateFrom(exElem); next = ExaArray1D<byte>.CreateFrom(exElem);
Assert.That(next.Length, Is.EqualTo(exElem.Length)); Assert.That(next.Length, Is.EqualTo(exElem.Length));
Assert.DoesNotThrow(() => Assert.DoesNotThrow(() => { next[4_999_999_999] = 0xab; });
{
next[4_999_999_999] = 0xab;
});
} }
[Test] [Test]
@ -315,9 +307,9 @@ namespace ExaArrayTests
{ {
var exPerf = new ExaArray1D<TestClass>(); var exPerf = new ExaArray1D<TestClass>();
exPerf.Extend(3); exPerf.Extend(3);
exPerf[0] = new TestClass{Age = 5}; exPerf[0] = new TestClass {Age = 5};
exPerf[1] = new TestClass{Age = 10}; exPerf[1] = new TestClass {Age = 10};
exPerf[2] = new TestClass{Age = 45}; exPerf[2] = new TestClass {Age = 45};
var next = ExaArray1D<TestClass>.CreateFrom(exPerf); var next = ExaArray1D<TestClass>.CreateFrom(exPerf);
Assert.That(next.Length, Is.EqualTo(3)); Assert.That(next.Length, Is.EqualTo(3));
@ -436,9 +428,9 @@ namespace ExaArrayTests
{ {
var exPerf = new ExaArray1D<TestClass>(); var exPerf = new ExaArray1D<TestClass>();
exPerf.Extend(3); exPerf.Extend(3);
exPerf[0] = new TestClass{Age = 5}; exPerf[0] = new TestClass {Age = 5};
exPerf[1] = new TestClass{Age = 10}; exPerf[1] = new TestClass {Age = 10};
exPerf[2] = new TestClass{Age = 45}; exPerf[2] = new TestClass {Age = 45};
var next = ExaArray1D<TestClass>.CreateFrom(exPerf, 2, 2); var next = ExaArray1D<TestClass>.CreateFrom(exPerf, 2, 2);
Assert.That(next.Length, Is.EqualTo(1)); Assert.That(next.Length, Is.EqualTo(1));
@ -653,7 +645,7 @@ namespace ExaArrayTests
var exPerf3 = list.AsEnumerable().AsExaArray(3); var exPerf3 = list.AsEnumerable().AsExaArray(3);
Assert.That(exPerf3.OptimizationStrategy, Is.EqualTo(Strategy.MAX_PERFORMANCE)); Assert.That(exPerf3.OptimizationStrategy, Is.EqualTo(Strategy.MAX_PERFORMANCE));
Assert.That(exPerf3.Length, Is.EqualTo(3)); Assert.That(exPerf3.Length, Is.EqualTo(3));
Assert.That(exPerf3.Items(), Is.EquivalentTo(new int[] {5,7,8})); Assert.That(exPerf3.Items(), Is.EquivalentTo(new int[] {5, 7, 8}));
} }
[Test] [Test]
@ -743,5 +735,4 @@ namespace ExaArrayTests
TestContext.WriteLine($"Performing 100M assignments took {t2Times.Average()} ms (average) by means of the max. performance strategy (min={t2Times.Min()} ms, max={t2Times.Max()} ms)"); TestContext.WriteLine($"Performing 100M assignments took {t2Times.Average()} ms (average) by means of the max. performance strategy (min={t2Times.Min()} ms, max={t2Times.Max()} ms)");
} }
} }
}
} }