From 0e726e9cd8cb077e84f66a91ba40de0d4b671aa4 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 7 May 2022 23:12:28 +0100 Subject: [PATCH] Cast sbyte values Rename test file to SByteTests.cs --- .../src/Linq/{SByteExtensions.cs => SByteTests.cs} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename X10D.Tests/src/Linq/{SByteExtensions.cs => SByteTests.cs} (63%) diff --git a/X10D.Tests/src/Linq/SByteExtensions.cs b/X10D.Tests/src/Linq/SByteTests.cs similarity index 63% rename from X10D.Tests/src/Linq/SByteExtensions.cs rename to X10D.Tests/src/Linq/SByteTests.cs index 59d01a7..3e360f9 100644 --- a/X10D.Tests/src/Linq/SByteExtensions.cs +++ b/X10D.Tests/src/Linq/SByteTests.cs @@ -12,12 +12,12 @@ public class SByteTests { sbyte Cast(int i) => (sbyte)i; - Assert.AreEqual(0, Enumerable.Range(0, 10).Product()); - Assert.AreEqual(1, Enumerable.Range(1, 1).Product()); - Assert.AreEqual(2, Enumerable.Range(1, 2).Product()); - Assert.AreEqual(6, Enumerable.Range(1, 3).Product()); - Assert.AreEqual(24, Enumerable.Range(1, 4).Product()); - Assert.AreEqual(120, Enumerable.Range(1, 5).Product()); + Assert.AreEqual(0, Enumerable.Range(0, 10).Select(Cast).Product()); + Assert.AreEqual(1, Enumerable.Range(1, 1).Select(Cast).Product()); + Assert.AreEqual(2, Enumerable.Range(1, 2).Select(Cast).Product()); + Assert.AreEqual(6, Enumerable.Range(1, 3).Select(Cast).Product()); + Assert.AreEqual(24, Enumerable.Range(1, 4).Select(Cast).Product()); + Assert.AreEqual(120, Enumerable.Range(1, 5).Select(Cast).Product()); // 6! will overflow for sbyte }