diff --git a/MoreLinq.Test/TransposeTest.cs b/MoreLinq.Test/TransposeTest.cs index 2e1cf417d..0394c4a9b 100644 --- a/MoreLinq.Test/TransposeTest.cs +++ b/MoreLinq.Test/TransposeTest.cs @@ -58,7 +58,7 @@ public void TransposeWithRowsOfSameLength() using var row3 = TestingSequence.Of(30, 31, 32, 33); using var matrix = TestingSequence.Of(row1, row2, row3); - AssertMatrix(expectations, matrix.Transpose()); + Assert.That(matrix.Transpose(), Is.EqualTo(expectations)); } [Test] @@ -77,7 +77,7 @@ public void TransposeWithRowsOfDifferentLengths() using var row4 = TestingSequence.Of(30, 31, 32); using var matrix = TestingSequence.Of(row1, row2, row3, row4); - AssertMatrix(expectations, matrix.Transpose()); + Assert.That(matrix.Transpose(), Is.EqualTo(expectations)); } [Test] @@ -116,7 +116,7 @@ public void TransposeWithAllRowsAsInfiniteSequences() [32, 243, 3125] }; - AssertMatrix(expectations, result); + Assert.That(result, Is.EqualTo(expectations)); } [Test] @@ -139,7 +139,7 @@ public void TransposeWithSomeRowsAsInfiniteSequences() [32, 3125] }; - AssertMatrix(expectations, result); + Assert.That(result, Is.EqualTo(expectations)); } [Test] @@ -207,18 +207,5 @@ static bool IsPrime(int number) return true; } - - static void AssertMatrix(IEnumerable> expectation, IEnumerable> result) - { - // necessary because NUnitLite 3.6.1 (.NET 4.5) for Mono don't assert nested enumerables - - var resultList = result.ToList(); - var expectationList = expectation.ToList(); - - Assert.That(resultList.Count, Is.EqualTo(expectationList.Count)); - - expectationList.Zip(resultList, ValueTuple.Create) - .ForEach(t => t.Item1.AssertSequenceEqual(t.Item2)); - } } } diff --git a/test.sh b/test.sh index 8427d1849..5287da315 100755 --- a/test.sh +++ b/test.sh @@ -23,13 +23,5 @@ dotnet reportgenerator -reports:MoreLinq.Test/TestResults/coverage-*.opencover.x -reporttypes:Html\;TextSummary \ -targetdir:MoreLinq.Test/TestResults/reports cat MoreLinq.Test/TestResults/reports/Summary.txt -if [[ -z `which mono 2>/dev/null` ]]; then - echo>&2 NOTE! Mono does not appear to be installed so unit tests - echo>&2 against the Mono runtime will be skipped. -else - for c in $configs; do - mono MoreLinq.Test/bin/$c/net471/MoreLinq.Test.exe - done -fi dotnet publish MoreLinq.Test.Aot "$(find MoreLinq.Test.Aot -type d -name publish)/MoreLinq.Test.Aot"