mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-22 19:28:48 +00:00
Cast sbyte values
Rename test file to SByteTests.cs
This commit is contained in:
parent
3434840c39
commit
0e726e9cd8
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user