Skip to content

Commit

Permalink
Added test to check for value larger than int max
Browse files Browse the repository at this point in the history
  • Loading branch information
quajak committed Feb 24, 2018
1 parent 638078f commit 496144a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tests/Cosmos.Compiler.Tests.Bcl/System/MathTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ public static void Execute()
result = Math.Ceiling(double.NegativeInfinity);
Assert.IsTrue(double.IsNegativeInfinity(result), "Ceiling gives correct value for -INF");

result = Math.Ceiling((double)int.MaxValue + 2.5);
Assert.IsTrue(EqualityHelper.DoublesAreEqual(result, (double)int.MaxValue + 3), "Ceiling works for values larger than an int can hold. " + result + " expected " + (double)int.MaxValue + 3);

#endregion Ceiling

#region Math.Cos
Expand Down

0 comments on commit 496144a

Please sign in to comment.