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

Unified Diff: test/mjsunit/regexp-string-methods.js

Issue 6869007: Cleanup of mjsunit.js code and make assertEquals more strict. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 9 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 | « test/mjsunit/regexp-static.js ('k') | test/mjsunit/regress/regress-1199637.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regexp-string-methods.js
diff --git a/test/mjsunit/regexp-string-methods.js b/test/mjsunit/regexp-string-methods.js
index ef3bf6eaf18a1114f7b1b83fd7f401081a176b38..56604a6539e761d592e01f73ae8804649556815d 100644
--- a/test/mjsunit/regexp-string-methods.js
+++ b/test/mjsunit/regexp-string-methods.js
@@ -28,18 +28,18 @@
// Regexp shouldn't use String.prototype.slice()
var s = new String("foo");
assertEquals("f", s.slice(0,1));
-String.prototype.slice = function() { return "x"; }
+String.prototype.slice = function() { return "x"; };
assertEquals("x", s.slice(0,1));
-assertEquals("g", /g/.exec("gg"));
+assertEquals(["g"], /g/.exec("gg"));
// Regexp shouldn't use String.prototype.charAt()
var f1 = new RegExp("f", "i");
-assertEquals("F", f1.exec("F"));
+assertEquals(["F"], f1.exec("F"));
assertEquals("f", "foo".charAt(0));
String.prototype.charAt = function(idx) { return 'g'; };
assertEquals("g", "foo".charAt(0));
var f2 = new RegExp("[g]", "i");
-assertEquals("G", f2.exec("G"));
+assertEquals(["G"], f2.exec("G"));
assertTrue(f2.ignoreCase);
// On the other hand test is defined in a semi-coherent way as a call to exec.
@@ -47,5 +47,5 @@ assertTrue(f2.ignoreCase);
// We match other browsers in using the original value of RegExp.prototype.exec.
// I.e., RegExp.prototype.test shouldn't use the current value of
// RegExp.prototype.exec.
-RegExp.prototype.exec = function(string) { return 'x'; }
+RegExp.prototype.exec = function(string) { return 'x'; };
assertFalse(/f/.test('x'));
« no previous file with comments | « test/mjsunit/regexp-static.js ('k') | test/mjsunit/regress/regress-1199637.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698