Index: test/mjsunit/harmony/function-name.js |
diff --git a/test/mjsunit/harmony/function-name.js b/test/mjsunit/harmony/function-name.js |
index 5265c2d22a2fd6dd4b39e4c3a11e3058e1160bee..7bb1f6ae01e59c107e0f99ef8766ea3e5942016f 100644 |
--- a/test/mjsunit/harmony/function-name.js |
+++ b/test/mjsunit/harmony/function-name.js |
@@ -357,3 +357,17 @@ |
var obj = { ['foo']: factory() }; |
assertEquals('', obj.foo.name); |
})(); |
+ |
+ |
+(function testNameNotReflectedInToString() { |
+ var f = function() {}; |
+ var g = function*() {}; |
+ var obj = { |
+ ['h']: function() {}, |
+ i: () => {} |
+ }; |
+ assertEquals('function () {}', f.toString()); |
+ assertEquals('function* () {}', g.toString()); |
+ assertEquals('function () {}', obj.h.toString()); |
+ assertEquals('() => {}', obj.i.toString()); |
+})(); |