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

Unified Diff: test/transformer/mock_aggregate.dart

Issue 1947773002: Fix all strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/barback@master
Patch Set: Code review changes Created 4 years, 7 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
« no previous file with comments | « test/transformer/mock.dart ('k') | test/transformer/one_to_many.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/transformer/mock_aggregate.dart
diff --git a/test/transformer/mock_aggregate.dart b/test/transformer/mock_aggregate.dart
index 7f47b539aa7016ba9c96b26ace89a98fd5786107..1b1fefd77cc156daa571f7d175e68169f6f2654b 100644
--- a/test/transformer/mock_aggregate.dart
+++ b/test/transformer/mock_aggregate.dart
@@ -153,10 +153,9 @@ abstract class MockAggregateTransformer extends AggregateTransformer {
/// Like [AggregateTransform.getInput], but respects [pauseGetInput].
///
/// This is intended for use by subclasses of [MockAggregateTransformer].
- Future<Asset> getInput(AggregateTransform transform, AssetId id) {
- return newFuture(() {
- if (_getInput.containsKey(id)) return _getInput[id].future;
- }).then((_) => transform.getInput(id));
+ Future<Asset> getInput(AggregateTransform transform, AssetId id) async {
+ if (_getInput.containsKey(id)) await _getInput[id].future;
+ return await transform.getInput(id);
}
/// Like [AggregateTransform.primaryInputs], but respects
@@ -169,14 +168,10 @@ abstract class MockAggregateTransformer extends AggregateTransformer {
}).then((_) => transform.primaryInputs));
}
- Future<String> classifyPrimary(AssetId id) {
- return newFuture(() => doClassifyPrimary(id)).then((result) {
- return newFuture(() {
- if (_classifyPrimary.containsKey(id)) {
- return _classifyPrimary[id].future;
- }
- }).then((_) => result);
- });
+ Future<String> classifyPrimary(AssetId id) async {
+ var result = await doClassifyPrimary(id);
+ if (_classifyPrimary.containsKey(id)) await _classifyPrimary[id].future;
+ return result;
}
Future apply(AggregateTransform transform) {
« no previous file with comments | « test/transformer/mock.dart ('k') | test/transformer/one_to_many.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698