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

Side by Side Diff: pkg/code_transformers/lib/src/test_harness.dart

Issue 199413020: Fixes code_transformers after the latest analyzer changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « pkg/code_transformers/lib/src/resolver_impl.dart ('k') | pkg/code_transformers/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Utilities for creating unit tests of Barback transformers. 5 /// Utilities for creating unit tests of Barback transformers.
6 library code_transformers.src.test_harness; 6 library code_transformers.src.test_harness;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 import 'package:barback/barback.dart'; 10 import 'package:barback/barback.dart';
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return barback.results.first.then((_) { 110 return barback.results.first.then((_) {
111 if (files == null) return null; 111 if (files == null) return null;
112 var futures = []; 112 var futures = [];
113 files.forEach((k, v) { 113 files.forEach((k, v) {
114 futures.add(check(k, v)); 114 futures.add(check(k, v));
115 }); 115 });
116 return Future.wait(futures); 116 return Future.wait(futures);
117 }).then((_) { 117 }).then((_) {
118 // We only check messages when an expectation is provided. 118 // We only check messages when an expectation is provided.
119 if (messages == null) return; 119 if (messages == null) return;
120 expect(messages.length, messagesSeen, 120 expect(messagesSeen, messages.length,
121 reason: 'less messages than expected'); 121 reason: 'less messages than expected');
122 }); 122 });
123 } 123 }
124 } 124 }
OLDNEW
« no previous file with comments | « pkg/code_transformers/lib/src/resolver_impl.dart ('k') | pkg/code_transformers/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698