Index: test/codegen/corelib/reg_exp_first_match_test.dart |
diff --git a/test/codegen/language/closure_test.dart b/test/codegen/corelib/reg_exp_first_match_test.dart |
similarity index 54% |
copy from test/codegen/language/closure_test.dart |
copy to test/codegen/corelib/reg_exp_first_match_test.dart |
index 9dc3a90994cdb2eacce12f69a85c70a4f549f95c..40e38fa109ccd9184765c8b2dfadf39c202023a6 100644 |
--- a/test/codegen/language/closure_test.dart |
+++ b/test/codegen/corelib/reg_exp_first_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.firstMatch. |
-class ClosureTest { |
+class RegExpFirstMatchTest { |
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+)").firstMatch("cat dog")[0]); |
+ Expect.equals(null, new RegExp("foo").firstMatch("bar")); |
} |
} |
main() { |
- ClosureTest.testMain(); |
+ RegExpFirstMatchTest.testMain(); |
} |