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

Unified Diff: test/codegen/corelib/regexp/issue_19193_test.dart

Issue 1945153002: Add corelib tests (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: error_test and range_error_test now pass Created 4 years, 7 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: test/codegen/corelib/regexp/issue_19193_test.dart
diff --git a/test/codegen/language/dead_field_access_test.dart b/test/codegen/corelib/regexp/issue_19193_test.dart
similarity index 55%
copy from test/codegen/language/dead_field_access_test.dart
copy to test/codegen/corelib/regexp/issue_19193_test.dart
index e3fc11b6c5f33af074b45ea57a53194aadb20daa..52746cf5b67482b8921d03a3f4213c812b5df2a5 100644
--- a/test/codegen/language/dead_field_access_test.dart
+++ b/test/codegen/corelib/regexp/issue_19193_test.dart
@@ -4,17 +4,9 @@
import 'package:expect/expect.dart';
-class Foo {
- var field = 10;
-}
-
-@NoInline()
-getField(x) {
- x.field;
- return 34;
-}
-
+// Regression test for http://dartbug.com/19193
main() {
- Expect.equals(34, getField(new Foo()));
- Expect.throws(() => getField(null));
+ RegExp re = new RegExp(r'.*(a+)+\d');
+ Expect.isTrue("a0aaaaaaaaaaaaa".contains(re));
+ Expect.isTrue("a0aaaaaaaaaaaaaa".contains(re)); // false when using JSCRE.
}
« no previous file with comments | « test/codegen/corelib/regexp/invalid-range-in-class_test.dart ('k') | test/codegen/corelib/regexp/lastindex_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698