Index: test/mjsunit/es6/string-search.js |
diff --git a/test/mjsunit/harmony/string-match.js b/test/mjsunit/es6/string-search.js |
similarity index 53% |
copy from test/mjsunit/harmony/string-match.js |
copy to test/mjsunit/es6/string-search.js |
index 25a3ca2fd1b691c6ceb52f86c0617fc42c182992..dc029826ad3e6cabbc2e56c0ccb4a2c8d67ac91c 100644 |
--- a/test/mjsunit/harmony/string-match.js |
+++ b/test/mjsunit/es6/string-search.js |
@@ -5,16 +5,16 @@ |
// Flags: --harmony-regexp-subclass |
var pattern = {}; |
-pattern[Symbol.match] = function(string) { |
+pattern[Symbol.search] = function(string) { |
return string.length; |
}; |
// Check object coercible fails. |
-assertThrows(() => String.prototype.match.call(null, pattern), |
+assertThrows(() => String.prototype.search.call(null, pattern), |
TypeError); |
// Override is called. |
-assertEquals(5, "abcde".match(pattern)); |
+assertEquals(5, "abcde".search(pattern)); |
// Non-callable override. |
-pattern[Symbol.match] = "dumdidum"; |
-assertThrows(() => "abcde".match(pattern), TypeError); |
+pattern[Symbol.search] = "dumdidum"; |
+assertThrows(() => "abcde".search(pattern), TypeError); |
-assertEquals("[Symbol.match]", RegExp.prototype[Symbol.match].name); |
+assertEquals("[Symbol.search]", RegExp.prototype[Symbol.search].name); |