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

Unified Diff: test/codegen/corelib/reg_exp_has_match_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
« no previous file with comments | « test/codegen/corelib/reg_exp_groups_test.dart ('k') | test/codegen/corelib/reg_exp_pattern_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/corelib/reg_exp_has_match_test.dart
diff --git a/test/codegen/language/allocate_test.dart b/test/codegen/corelib/reg_exp_has_match_test.dart
similarity index 50%
copy from test/codegen/language/allocate_test.dart
copy to test/codegen/corelib/reg_exp_has_match_test.dart
index 1f2fce2a6ba2ce5bbfa6b567ed681e4bf49455fa..6ff27443fa957e8601a58e85a7ff599c794531f1 100644
--- a/test/codegen/language/allocate_test.dart
+++ b/test/codegen/corelib/reg_exp_has_match_test.dart
@@ -4,18 +4,16 @@
import "package:expect/expect.dart";
-class MyAllocate {
- const MyAllocate([int value = 0]) : value_ = value;
- int getValue() { return value_; }
- final int value_;
-}
+// Dart test program for RegExp.hasMatch.
-class AllocateTest {
+class RegExpHasMatchTest {
static testMain() {
- Expect.equals(900, (new MyAllocate(900)).getValue());
+ Expect.equals(false, new RegExp("bar").hasMatch("foo"));
+ Expect.equals(true, new RegExp("bar|foo").hasMatch("foo"));
+ Expect.equals(true, new RegExp("o+").hasMatch("foo"));
}
}
main() {
- AllocateTest.testMain();
+ RegExpHasMatchTest.testMain();
}
« no previous file with comments | « test/codegen/corelib/reg_exp_groups_test.dart ('k') | test/codegen/corelib/reg_exp_pattern_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698