MCPcopy Create free account
hub / github.com/nodejs/node / test

Function test

deps/v8/test/webkit/array-proto-func-property-getter-except.js:28–46  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

26);
27
28function test(f) {
29
30 var testObj = {
31 length: 3
32 };
33 var propertyGetter = {
34 get: (function() { throw true; })
35 }
36 Object.defineProperty(testObj, 0, propertyGetter);
37 Object.defineProperty(testObj, 1, propertyGetter);
38 Object.defineProperty(testObj, 2, propertyGetter);
39
40 try {
41 f.call(testObj, function(){});
42 return false;
43 } catch (e) {
44 return e === true;
45 }
46}
47
48// This test makes sense for these functions: (they should get all properties on the array)
49shouldBeTrue("test(Array.prototype.sort)");

Callers

nothing calls this directly

Calls 2

definePropertyMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected