Ejemplo n.º 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"));
        }
Ejemplo n.º 2
0
 public void TestPartIntWithBase16()
 {
     Assert.AreEqual(291, JsGlobal.ParseInt("0x123"));
 }
Ejemplo n.º 3
0
 public void TestPartIntWithBase10()
 {
     Assert.AreEqual(123, JsGlobal.ParseInt("123", 10));
 }