2006-12-30 Alp Toker <alp@atoker.com>
authorAlp Toker <alp@mono-cvs.ximian.com>
Sat, 30 Dec 2006 03:28:46 +0000 (03:28 -0000)
committerAlp Toker <alp@mono-cvs.ximian.com>
Sat, 30 Dec 2006 03:28:46 +0000 (03:28 -0000)
* MathTest.cs: Add test case for new (2.0) Decimal.Ceiling.
Based on feedback on #80384.

svn path=/trunk/mcs/; revision=70252

mcs/class/corlib/Test/System/ChangeLog
mcs/class/corlib/Test/System/MathTest.cs

index 1c9412b590ea69ec107c828bb880c10cdc54a9af..f86ed32022337cce7bde3c25139c03b6c860364e 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-30  Alp Toker  <alp@atoker.com>
+
+       * MathTest.cs: Add test case for new (2.0) Decimal.Ceiling.
+       Based on feedback on #80384.
+
 2006-12-22  Sebastien Pouliot  <sebastien@ximian.com> 
 
        * DateTimeTest.cs: Add test cases for new (2.0) [To|From]Binary
index 32a75cb02d4d1dbdf98b884d3917681a4cb37467..b994d3459b0545f1c1c15e1d8efb3f7f4d4cb788 100644 (file)
@@ -319,6 +319,27 @@ public class MathTest : Assertion {
                }
        }
 
+#if NET_2_0
+       public void TestDecimalCeiling() {
+               int iTest = 1;
+               try {
+                       decimal a = Math.Ceiling(1.5M);
+                       decimal b = 2M;
+
+                       iTest++;
+                       Assert(a == b);
+
+                       iTest++;
+                       Assert(Decimal.MaxValue == Math.Ceiling(Decimal.MaxValue));
+
+                       iTest++;
+                       Assert(Decimal.MinValue == Math.Ceiling(Decimal.MinValue));
+               } catch (Exception e) {
+                       Fail("Unexpected Exception at iTest=" + iTest + ": " + e);
+               }
+       }
+#endif
+
        public void TestFloor() {
                try {
                        double a = Math.Floor(1.5);