| Index: test/common.dart
|
| diff --git a/test/common.dart b/test/common.dart
|
| index 859b72e06277b4bdf0c009764ed7ab5619c45f43..f121be5841a65b4be01914fa648a9a3a3f41a85c 100644
|
| --- a/test/common.dart
|
| +++ b/test/common.dart
|
| @@ -15,3 +15,37 @@ testPhases(String testName, List<List<Transformer>> phases,
|
| return helper.checkAll(expectedFiles).whenComplete(() => helper.tearDown());
|
| });
|
| }
|
| +
|
| +// Simple mock of initialize.
|
| +const mockInitialize = '''
|
| + library initialize;
|
| +
|
| + abstract class Initializer<T> {}
|
| +
|
| + class _InitMethod implements Initializer<Function> {
|
| + const _InitMethod();
|
| + }
|
| + const _InitMethod initMethod = const _InitMethod();''';
|
| +
|
| +// Some simple initializers for use in tests.
|
| +const commonInitializers = '''
|
| + library test_initializers;
|
| +
|
| + import 'package:initialize/initialize.dart';
|
| +
|
| + class _ConstInit extends Initializer<dynamic> {
|
| + const ConstInit();
|
| + }
|
| + const _ConstInit constInit = const _ConstInit();
|
| +
|
| + class DynamicInit extends Initializer<dynamic> {
|
| + final dynamic _value;
|
| + const DynamicInit(this._value);
|
| + }
|
| +
|
| + class NamedArgInit extends Initializer<dynamic> {
|
| + final dynamic _first;
|
| + final dynamic name;
|
| + const NamedArgInit(this._first, {this.name});
|
| + }
|
| + ''';
|
|
|