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

Function local_function_test

deps/v8/test/mjsunit/strict-mode-implicit-receiver.js:49–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48// Test calls to local strict mode function with implicit receiver.
49function local_function_test() {
50 function get_y() { return this.y; }
51 function strict_get_y() { "use strict"; return this.y; }
52 assertEquals(3, get_y());
53 assertEquals(3, get_y(23));
54 var exception = false;
55 try {
56 strict_get_y();
57 } catch(e) {
58 exception = true;
59 }
60 assertTrue(exception);
61}
62
63for (var i = 0; i < 10; i++) {
64 local_function_test();

Calls 4

get_yFunction · 0.85
strict_get_yFunction · 0.85
assertTrueFunction · 0.70
assertEqualsFunction · 0.50

Tested by

no test coverage detected