Skip to content

Commit 5dc9e18

Browse files
authored
Drop conditional testing on Mono (#1081)
1 parent ede868e commit 5dc9e18

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

MoreLinq.Test/TransposeTest.cs

+4-17
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void TransposeWithRowsOfSameLength()
5858
using var row3 = TestingSequence.Of(30, 31, 32, 33);
5959
using var matrix = TestingSequence.Of(row1, row2, row3);
6060

61-
AssertMatrix(expectations, matrix.Transpose());
61+
Assert.That(matrix.Transpose(), Is.EqualTo(expectations));
6262
}
6363

6464
[Test]
@@ -77,7 +77,7 @@ public void TransposeWithRowsOfDifferentLengths()
7777
using var row4 = TestingSequence.Of(30, 31, 32);
7878
using var matrix = TestingSequence.Of(row1, row2, row3, row4);
7979

80-
AssertMatrix(expectations, matrix.Transpose());
80+
Assert.That(matrix.Transpose(), Is.EqualTo(expectations));
8181
}
8282

8383
[Test]
@@ -116,7 +116,7 @@ public void TransposeWithAllRowsAsInfiniteSequences()
116116
[32, 243, 3125]
117117
};
118118

119-
AssertMatrix(expectations, result);
119+
Assert.That(result, Is.EqualTo(expectations));
120120
}
121121

122122
[Test]
@@ -139,7 +139,7 @@ public void TransposeWithSomeRowsAsInfiniteSequences()
139139
[32, 3125]
140140
};
141141

142-
AssertMatrix(expectations, result);
142+
Assert.That(result, Is.EqualTo(expectations));
143143
}
144144

145145
[Test]
@@ -207,18 +207,5 @@ static bool IsPrime(int number)
207207

208208
return true;
209209
}
210-
211-
static void AssertMatrix<T>(IEnumerable<IEnumerable<T>> expectation, IEnumerable<IEnumerable<T>> result)
212-
{
213-
// necessary because NUnitLite 3.6.1 (.NET 4.5) for Mono don't assert nested enumerables
214-
215-
var resultList = result.ToList();
216-
var expectationList = expectation.ToList();
217-
218-
Assert.That(resultList.Count, Is.EqualTo(expectationList.Count));
219-
220-
expectationList.Zip(resultList, ValueTuple.Create)
221-
.ForEach(t => t.Item1.AssertSequenceEqual(t.Item2));
222-
}
223210
}
224211
}

test.sh

-8
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,5 @@ dotnet reportgenerator -reports:MoreLinq.Test/TestResults/coverage-*.opencover.x
2323
-reporttypes:Html\;TextSummary \
2424
-targetdir:MoreLinq.Test/TestResults/reports
2525
cat MoreLinq.Test/TestResults/reports/Summary.txt
26-
if [[ -z `which mono 2>/dev/null` ]]; then
27-
echo>&2 NOTE! Mono does not appear to be installed so unit tests
28-
echo>&2 against the Mono runtime will be skipped.
29-
else
30-
for c in $configs; do
31-
mono MoreLinq.Test/bin/$c/net471/MoreLinq.Test.exe
32-
done
33-
fi
3426
dotnet publish MoreLinq.Test.Aot
3527
"$(find MoreLinq.Test.Aot -type d -name publish)/MoreLinq.Test.Aot"

0 commit comments

Comments
 (0)