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

Unified Diff: tests/corelib/regexp/alternative-length-miscalculation_test.dart

Issue 667043003: Port regexp tests from V8 to Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: tests/corelib/regexp/alternative-length-miscalculation_test.dart
diff --git a/tests/language/deferred_only_constant_test.dart b/tests/corelib/regexp/alternative-length-miscalculation_test.dart
similarity index 50%
copy from tests/language/deferred_only_constant_test.dart
copy to tests/corelib/regexp/alternative-length-miscalculation_test.dart
index e50d7ba6a1537a687787b7659fb528b57ce85746..4c532f9b2c7712f8bd29b21f538015ae8faf3107 100644
--- a/tests/language/deferred_only_constant_test.dart
+++ b/tests/corelib/regexp/alternative-length-miscalculation_test.dart
@@ -2,14 +2,17 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Testing import of only constants from a deferred library.
-
+import 'util.dart';
import 'package:expect/expect.dart';
-import "deferred_only_constant_lib.dart" deferred as lib;
-
void main() {
- lib.loadLibrary().then((_) {
- Expect.equals(lib.constant, const ["a", "b", "c"]);
- });
-}
+ description(
+ "This page tests for length miscalculations in regular expression processing."
+ );
+
+ var re = new RegExp(r"b|[^b]");
+ assertEquals('a'.indexOf(re, 1), -1);
+
+ var re2 = new RegExp(r"[^a]|ab");
+ shouldBeFalse(re2.hasMatch(''));
+}

Powered by Google App Engine
This is Rietveld 408576698