PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/js/src/jit-test/tests/debug/Object-deleteProperty-01.js

http://github.com/zpao/v8monkey
JavaScript | 17 lines | 11 code | 5 blank | 1 comment | 0 complexity | 274d8dd0eb2ee2cfd12b2adc33b40350 MD5 | raw file
 1// Basic deleteProperty tests.
 2
 3var g = newGlobal('new-compartment');
 4var dbg = new Debugger;
 5var gw = dbg.addDebuggee(g);
 6
 7assertEq(gw.deleteProperty("no such property"), true);
 8
 9g.Object.defineProperty(g, "p", {configurable: true, value: 0});
10assertEq(gw.deleteProperty("p"), true);
11
12g[0] = 0;
13assertEq(gw.deleteProperty(0), true);
14assertEq("0" in g, false);
15
16assertEq(gw.deleteProperty(), false);  // can't delete g.undefined
17assertEq(g.undefined, undefined);