示例#1
0
def test_load():
    pwd = py.path.local(__file__)
    js_file = str(pwd.dirpath("test_load.js"))
    assertv("load('" + js_file + "'); x;", 1)
示例#2
0
def test_infinity_nan():
    assertv('1/0', 'Infinity')
    assertv('0/0', 'NaN')
    assertv('-1/0', '-Infinity')
示例#3
0
def test_overflow_int_to_float():
    assertv('1e200', '1e+200')
示例#4
0
def test_variable_deletion():
    assertv("var x = 3; delete this.x;", False)
    assertv("x = 3; delete this.x;", True)
    assertv("var x = 3; delete this.x; x", 3)