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

Unified Diff: tests/language/regex/alternative-length-miscalculation_test.dart

Issue 539153002: Port and integrate the irregexp engine from V8 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed Ivan's comments. 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/language/regex/UC16_test.dart ('k') | tests/language/regex/alternatives_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/regex/alternative-length-miscalculation_test.dart
diff --git a/tests/language/deferred_closurize_load_library_test.dart b/tests/language/regex/alternative-length-miscalculation_test.dart
similarity index 50%
copy from tests/language/deferred_closurize_load_library_test.dart
copy to tests/language/regex/alternative-length-miscalculation_test.dart
index 6c90cb6147fb142b52d7c84cf8bb9cb97385a179..4c532f9b2c7712f8bd29b21f538015ae8faf3107 100644
--- a/tests/language/deferred_closurize_load_library_test.dart
+++ b/tests/language/regex/alternative-length-miscalculation_test.dart
@@ -2,16 +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.
+import 'util.dart';
import 'package:expect/expect.dart';
-import 'package:async_helper/async_helper.dart';
-
-import "deferred_closurize_load_library_lib.dart" deferred as lib;
void main() {
- var x = lib.loadLibrary;
- asyncStart();
- x().then((_) {
- Expect.isTrue(lib.trueVar);
- asyncEnd();
- });
+ 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(''));
}
« no previous file with comments | « tests/language/regex/UC16_test.dart ('k') | tests/language/regex/alternatives_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698