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

Unified Diff: test/codegen/corelib/reg_exp_string_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_start_end_test.dart ('k') | test/codegen/corelib/regexp/UC16_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_string_match_test.dart
diff --git a/test/codegen/language/closure_test.dart b/test/codegen/corelib/reg_exp_string_match_test.dart
similarity index 54%
copy from test/codegen/language/closure_test.dart
copy to test/codegen/corelib/reg_exp_string_match_test.dart
index 9dc3a90994cdb2eacce12f69a85c70a4f549f95c..05978dd215c6c75909cc56f08089190522fb991c 100644
--- a/test/codegen/language/closure_test.dart
+++ b/test/codegen/corelib/reg_exp_string_match_test.dart
@@ -1,24 +1,18 @@
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// 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.
-// Dart test for closures.
import "package:expect/expect.dart";
-class A {
- var field;
- A(this.field) {}
-}
+// Dart test program for RegExp.stringMatch.
-class ClosureTest {
+class RegExpStringMatchTest {
static testMain() {
- var o = new A(3);
- foo() => o.field++;
- Expect.equals(3, foo());
- Expect.equals(4, o.field);
+ Expect.equals('cat', new RegExp("(\\w+)").stringMatch("cat dog"));
+ Expect.equals(null, new RegExp("foo").stringMatch("bar"));
}
}
main() {
- ClosureTest.testMain();
+ RegExpStringMatchTest.testMain();
}
« no previous file with comments | « test/codegen/corelib/reg_exp_start_end_test.dart ('k') | test/codegen/corelib/regexp/UC16_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698