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

Unified Diff: test/intl/collator/en-sort.js

Issue 148883002: Synchronize with r15594. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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/intl/collator/default-locale.js ('k') | test/intl/collator/normalization.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/intl/collator/en-sort.js
diff --git a/test/mjsunit/compiler/osr-nested.js b/test/intl/collator/en-sort.js
similarity index 82%
copy from test/mjsunit/compiler/osr-nested.js
copy to test/intl/collator/en-sort.js
index 4bdb0828ca2272332701c579bcbf9952cf43e6a4..24adc773eb8a152f6f1a42422e254ae0b4ab057f 100644
--- a/test/mjsunit/compiler/osr-nested.js
+++ b/test/intl/collator/en-sort.js
@@ -25,22 +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.
-// Flags: --use-osr
+// Sort plain English text using defaults.
-function f() {
- var sum = 0;
- for (var i = 0; i < 10; i++) {
- for (var j = 0; j < 100000; j++) {
- var x = i + 2;
- var y = x + 5;
- var z = y + 3;
- sum += z;
- }
- }
- return sum;
-}
+var strings = ['blood', 'bull', 'ascend', 'zed', 'down'];
+var collator = Intl.Collator(['en']);
+var result = strings.sort(collator.compare);
-assertEquals(14500000, f());
-assertEquals(14500000, f());
-assertEquals(14500000, f());
+assertEquals('ascend', result[0]);
+assertEquals('blood', result[1]);
+assertEquals('bull', result[2]);
+assertEquals('down', result[3]);
+assertEquals('zed', result[4]);
« no previous file with comments | « test/intl/collator/default-locale.js ('k') | test/intl/collator/normalization.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698