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

Unified Diff: test/common.dart

Issue 865293002: support basic identifiers in constructors (Closed) Base URL: git@github.com:dart-lang/static-init.git@master
Patch Set: add support for list and map literals Created 5 years, 11 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/common.dart
diff --git a/test/common.dart b/test/common.dart
index 859b72e06277b4bdf0c009764ed7ab5619c45f43..81d78bafa21e371b30275668a878e7929e4df55b 100644
--- a/test/common.dart
+++ b/test/common.dart
@@ -15,3 +15,24 @@ testPhases(String testName, List<List<Transformer>> phases,
return helper.checkAll(expectedFiles).whenComplete(() => helper.tearDown());
});
}
+
+// Simple mock of initialize, plus some extra annotations for fun.
+const mockInitialize = '''
+ library initialize;
+
+ abstract class Initializer<T> {}
+
+ class _ConstInit extends Initializer<dynamic> {
+ const ConstInit();
+ }
+ const _ConstInit constInit = const _ConstInit();
+
+ class DynamicInit extends Initializer<dynamic> {
Siggi Cherem (dart-lang) 2015/01/23 17:56:28 I think we should keep this mockInitialize as a su
jakemac 2015/01/23 21:34:38 Done.
+ final String _name;
+ const DynamicInit(this._name);
+ }
+
+ class _InitMethod implements Initializer<Function> {
+ const _InitMethod();
+ }
+ const _InitMethod initMethod = const _InitMethod();''';

Powered by Google App Engine
This is Rietveld 408576698