Chromium Code Reviews

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

Issue 6073: Fixed use of undefined in ArraySort.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/array.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-sort.js
===================================================================
--- test/mjsunit/array-sort.js (revision 404)
+++ test/mjsunit/array-sort.js (working copy)
@@ -131,3 +131,12 @@
}
TestArraySortingWithHoles();
+
+// Test array sorting with undefined elemeents in the array.
+function TestArraySortingWithUndefined() {
+ var a = [3, void 0, 2];
+ a.sort();
+ assertArrayEquals([ 2, 3, void 0], a);
+}
+
+TestArraySortingWithUndefined();
« no previous file with comments | « src/array.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine