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

Unified Diff: test/mjsunit/array-push.js

Issue 1873833002: [elements] Add more tests to increase coverage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | test/mjsunit/array-splice.js » ('j') | test/mjsunit/array-splice.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-push.js
diff --git a/test/mjsunit/array-push.js b/test/mjsunit/array-push.js
index c87fd128e4bd4a19ccf07d6fd293592283726d89..ece3319bc15c57817017aae483ed4189306c12ca 100644
--- a/test/mjsunit/array-push.js
+++ b/test/mjsunit/array-push.js
@@ -146,3 +146,16 @@
f(a, {});
assertEquals(10, a.f());
})();
+
+
+(function testDoubleArrayPush() {
+ var a = [];
+ var max = 1000;
+ for (var i = 0; i < max; i++) {
+ a.push(i + 0.1);
+ }
+ assertEquals(max, a.length);
+ for (var i = 0; i < max; i++) {
+ assertEquals(i+0.1, a[i]);
+ }
+})();
« no previous file with comments | « no previous file | test/mjsunit/array-splice.js » ('j') | test/mjsunit/array-splice.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698