Merge pull request #654 from alesliehughes/master
[mono.git] / mcs / class / corlib / Test / System / UInt16Test.cs
index 0c55f99e7362b297e355337ed983bf159533d6c6..154f085d71436b10d26fdb0394eae89dfb638a77 100644 (file)
@@ -178,6 +178,7 @@ public class UInt16Test
                Assert.AreEqual (20, UInt16.Parse ("2E1", NumberStyles.AllowExponent), "A#2");
                Assert.AreEqual (200, UInt16.Parse ("2E2", NumberStyles.AllowExponent), "A#3");
                Assert.AreEqual (200, UInt16.Parse ("2E+2", NumberStyles.AllowExponent), "A#4");
+               Assert.AreEqual (2, UInt16.Parse ("2", NumberStyles.AllowExponent), "A#5");
 
                try {
                        UInt16.Parse ("2E");
@@ -221,6 +222,12 @@ public class UInt16Test
                        Assert.Fail ("B#7");
                } catch (OverflowException) {
                }
+               
+               try {
+                       UInt16.Parse ("2 math e1", NumberStyles.AllowExponent);
+                       Assert.Fail ("B#8");
+               } catch (FormatException) {
+               }
        }
 
        [Test]