From 496144ab71402ca5229d4ca2ce6af5dcdb6bbcb6 Mon Sep 17 00:00:00 2001 From: Quajak Date: Sat, 24 Feb 2018 17:25:31 +0100 Subject: [PATCH] Added test to check for value larger than int max --- Tests/Cosmos.Compiler.Tests.Bcl/System/MathTest.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/Cosmos.Compiler.Tests.Bcl/System/MathTest.cs b/Tests/Cosmos.Compiler.Tests.Bcl/System/MathTest.cs index cba0685b7..d61b85870 100644 --- a/Tests/Cosmos.Compiler.Tests.Bcl/System/MathTest.cs +++ b/Tests/Cosmos.Compiler.Tests.Bcl/System/MathTest.cs @@ -86,6 +86,9 @@ namespace Cosmos.Compiler.Tests.Bcl.System 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