Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: test/mjsunit/harmony/reflect.js

Issue 1397443013: [es6] Implement Reflect.enumerate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/harmony-reflect.js ('k') | test/mjsunit/harmony/reflect-enumerate.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/reflect.js
diff --git a/test/mjsunit/harmony/reflect.js b/test/mjsunit/harmony/reflect.js
index fc52c93d197c598978064b710f1e57648a44c691..f34a1ed81b2502440b895355f7d9ec2f00c03596 100644
--- a/test/mjsunit/harmony/reflect.js
+++ b/test/mjsunit/harmony/reflect.js
@@ -256,3 +256,23 @@ function prepare(tgt) {
assertFalse(Reflect.isExtensible(tgt));
}
})();
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Reflect.enumerate
+
+
+(function testReflectEnumerateArity() {
+ assertEquals(1, Reflect.enumerate.length);
+})();
+
+
+(function testReflectEnumerateOnNonObject() {
+ assertThrows(function() { Reflect.enumerate(); }, TypeError);
+ assertThrows(function() { Reflect.enumerate(42); }, TypeError);
+ assertThrows(function() { Reflect.enumerate(null); }, TypeError);
+})();
+
+
+// See reflect-enumerate*.js for further tests.
« no previous file with comments | « src/js/harmony-reflect.js ('k') | test/mjsunit/harmony/reflect-enumerate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698