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

Unified Diff: tests/corelib/regexp/ascii-regexp-subject_test.dart

Issue 691473002: Reapply "Port regexp tests from V8 to Dart." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: RC and rebase Created 6 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 | « tests/corelib/regexp/alternatives_test.dart ('k') | tests/corelib/regexp/assertion_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/regexp/ascii-regexp-subject_test.dart
diff --git a/runtime/third_party/double-conversion/src/strtod.h b/tests/corelib/regexp/ascii-regexp-subject_test.dart
similarity index 69%
copy from runtime/third_party/double-conversion/src/strtod.h
copy to tests/corelib/regexp/ascii-regexp-subject_test.dart
index ed0293b8f54a373762f17fe4dd70f2896eb1d193..67ff6072737ec7028cfbf1b1ced993055ae13ba5 100644
--- a/runtime/third_party/double-conversion/src/strtod.h
+++ b/tests/corelib/regexp/ascii-regexp-subject_test.dart
@@ -1,4 +1,5 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright (c) 2014, the Dart project authors. All rights reserved.
+// Copyright 2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,21 +26,29 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef DOUBLE_CONVERSION_STRTOD_H_
-#define DOUBLE_CONVERSION_STRTOD_H_
+/**
+* @fileoverview Check that an initial ^ will result in a faster match fail.
+*/
-#include "utils.h"
+import 'v8_regexp_utils.dart';
+import 'package:expect/expect.dart';
-namespace double_conversion {
+void main() {
+ var s = "foo";
+ var i;
-// The buffer must only contain digits in the range [0-9]. It must not
-// contain a dot or a sign. It must not start with '0', and must not be empty.
-double Strtod(Vector<const char> buffer, int exponent);
+ for (i = 0; i < 18; i++) {
+ s = s + s;
+ }
-// The buffer must only contain digits in the range [0-9]. It must not
-// contain a dot or a sign. It must not start with '0', and must not be empty.
-float Strtof(Vector<const char> buffer, int exponent);
+ dynamic repeatRegexp(re) {
+ for (i = 0; i < 1000; i++) {
+ re.hasMatch(s);
+ }
+ }
-} // namespace double_conversion
-
-#endif // DOUBLE_CONVERSION_STRTOD_H_
+ repeatRegexp(new RegExp(r"^bar"));
+ repeatRegexp(new RegExp(r"^foo|^bar|^baz"));
+ repeatRegexp(new RegExp(r"(^bar)"));
+ repeatRegexp(new RegExp(r"(?=^bar)\w+"));
+}
« no previous file with comments | « tests/corelib/regexp/alternatives_test.dart ('k') | tests/corelib/regexp/assertion_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698