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

Unified Diff: test/webkit/fast/regex/constructor.js

Issue 20280003: Migrate more tests from blink repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/webkit/fast/regex/assertion-expected.txt ('k') | test/webkit/fast/regex/constructor-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/webkit/fast/regex/constructor.js
diff --git a/test/webkit/dfg-add-not-number.js b/test/webkit/fast/regex/constructor.js
similarity index 86%
copy from test/webkit/dfg-add-not-number.js
copy to test/webkit/fast/regex/constructor.js
index df6dcdf2ef2b3c08e57020a17f9d3992c8ca95d3..9d352452868215d502dd3d2d18cc955d09f9d69f 100644
--- a/test/webkit/dfg-add-not-number.js
+++ b/test/webkit/fast/regex/constructor.js
@@ -21,15 +21,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-description(
-"Tests that adding things that aren't numbers using ++ does not crash or generate bogus code."
-);
+description("This test checks use of the regexp constructor.");
-function foo(a) {
- a++;
- return a;
-}
+var re = /abc/;
-for (var i = 0; i < 100; ++i)
- shouldBe("foo(\"foo\" + i)", "NaN");
+shouldBeTrue("re === RegExp(re)");
+shouldBeTrue("re !== new RegExp(re)");
+shouldThrow("re === RegExp(re,'i')");
+shouldThrow("re !== new RegExp(re,'i')");
« no previous file with comments | « test/webkit/fast/regex/assertion-expected.txt ('k') | test/webkit/fast/regex/constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698