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

Unified Diff: test/mjsunit/es6/string-includes.js

Issue 2399423003: [builtins] Move StringIncludes to a builtin. (Closed)
Patch Set: Add another test. Re-use IsRegExp logic Created 4 years, 2 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 | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/string-includes.js
diff --git a/test/mjsunit/es6/string-includes.js b/test/mjsunit/es6/string-includes.js
index c825ffdc6852496f332f28b1d70b9ef01d1ace24..60a7ddd6858e3349d4e0d2e5163b7c2a1bb120ae 100644
--- a/test/mjsunit/es6/string-includes.js
+++ b/test/mjsunit/es6/string-includes.js
@@ -27,6 +27,11 @@
assertEquals(1, String.prototype.includes.length);
+var s = 'a';
+assertFalse(s.includes(null));
+assertFalse(s.includes(undefined));
+assertFalse(s.includes());
+
var reString = "asdf[a-z]+(asdf)?";
assertTrue(reString.includes("[a-z]+"));
assertTrue(reString.includes("(asdf)?"));
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698