Index: test/mjsunit/es6/function-name.js |
diff --git a/test/mjsunit/es6/function-name.js b/test/mjsunit/es6/function-name.js |
index 3b0a6fcacbad78efd3069bf41b966c74bc46ba79..12cb3e6db1640727b3aa689d017bd57abe5816ed 100644 |
--- a/test/mjsunit/es6/function-name.js |
+++ b/test/mjsunit/es6/function-name.js |
@@ -373,3 +373,16 @@ |
assertEquals('function () {}', obj.h.toString()); |
assertEquals('() => {}', obj.i.toString()); |
})(); |
+ |
+(function testClassNameOrder() { |
+ assertEquals(['length', 'prototype'], Object.getOwnPropertyNames(class {})); |
+ |
+ class A { } |
+ assertEquals(['length', 'prototype', 'name'], Object.getOwnPropertyNames(A)); |
+ |
+ class B { static foo() { } } |
+ assertEquals(['length', 'prototype', 'foo', 'name'], Object.getOwnPropertyNames(B)); |
+ |
+ class C { static name() { } static foo() { } } |
+ assertEquals(['length', 'prototype', 'name', 'foo'], Object.getOwnPropertyNames(C)); |
+})(); |