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

Side by Side Diff: packages/initialize/test/common.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « packages/initialize/pubspec.yaml ('k') | packages/initialize/test/cycle_a.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 library initialize.test.build.common;
5
6 import 'package:barback/barback.dart';
7 import 'package:code_transformers/src/test_harness.dart';
8 import 'package:unittest/unittest.dart';
9
10 testPhases(String testName, List<List<Transformer>> phases,
11 Map<String, String> inputFiles, Map<String, String> expectedFiles,
12 [List<String> expectedMessages]) {
13 test(testName, () {
14 var helper = new TestHelper(phases, inputFiles, expectedMessages)..run();
15 return helper.checkAll(expectedFiles).whenComplete(() => helper.tearDown());
16 });
17 }
18
19 // Simple mock of initialize.
20 const mockInitialize = '''
21 library initialize;
22
23 abstract class Initializer<T> {}
24
25 class _InitMethod implements Initializer<Function> {
26 const _InitMethod();
27 }
28 const _InitMethod initMethod = const _InitMethod();''';
29
30 // Some simple initializers for use in tests.
31 const commonInitializers = '''
32 library test_initializers;
33
34 import 'package:initialize/initialize.dart';
35
36 class _ConstInit extends Initializer<dynamic> {
37 const ConstInit();
38 }
39 const _ConstInit constInit = const _ConstInit();
40
41 class DynamicInit extends Initializer<dynamic> {
42 final dynamic _value;
43 const DynamicInit(this._value);
44 }
45
46 class NamedArgInit extends Initializer<dynamic> {
47 final dynamic _first;
48 final dynamic name;
49 const NamedArgInit(this._first, {this.name});
50 }
51 ''';
OLDNEW
« no previous file with comments | « packages/initialize/pubspec.yaml ('k') | packages/initialize/test/cycle_a.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698