Chromium Code Reviews| 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();'''; |