예제 #1
0
        public void TestPartIntWithLeadingZero()
        {
            // ECMAScript 5 forbids a leading 0 denoting an octal number, and it should be interpreted as base-10.
            // All major browsers follow this convention.

            Assert.AreEqual(123, JsGlobal.ParseInt("0123"));
        }
예제 #2
0
 public void TestPartIntWithBase16()
 {
     Assert.AreEqual(291, JsGlobal.ParseInt("0x123"));
 }
예제 #3
0
 public void TestPartIntWithBase10()
 {
     Assert.AreEqual(123, JsGlobal.ParseInt("123", 10));
 }