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

Unified Diff: test/mjsunit/harmony/reflect-enumerate-delete.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 | « test/mjsunit/harmony/reflect-enumerate.js ('k') | test/mjsunit/harmony/reflect-enumerate-opt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/reflect-enumerate-delete.js
diff --git a/test/mjsunit/for-in-delete.js b/test/mjsunit/harmony/reflect-enumerate-delete.js
similarity index 87%
copy from test/mjsunit/for-in-delete.js
copy to test/mjsunit/harmony/reflect-enumerate-delete.js
index e9fc060ae68bd1297183704a1d0d8b7a4638d6e4..1137d8a0a4a0f4f21c7f8c2889c45fcefd692fdf 100644
--- a/test/mjsunit/for-in-delete.js
+++ b/test/mjsunit/harmony/reflect-enumerate-delete.js
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2010-2015 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,12 +25,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Test that properties deleted during a for-in iteration do not show up in
-// the for-in.
+// Test that properties deleted during an enumeration do not show up in
+// the enumeration. This is adapted from mjsunit/for-in-delete.js.
+
+// Flags: --harmony-reflect
+
function f(o, expected, del) {
var index = 0;
- for (p in o) {
+ for (p of Reflect.enumerate(o)) {
if (del) delete o[del];
assertEquals(expected[index], p);
index++;
« no previous file with comments | « test/mjsunit/harmony/reflect-enumerate.js ('k') | test/mjsunit/harmony/reflect-enumerate-opt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698