(f)
| 26 | ); |
| 27 | |
| 28 | function 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) |
| 49 | shouldBeTrue("test(Array.prototype.sort)"); |
nothing calls this directly
no test coverage detected