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

Unified Diff: test/transformer_test.dart

Issue 1838473002: fix observe package to be strong mode clean (Closed) Base URL: git@github.com:dart-lang/observe.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/path_observer_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/transformer_test.dart
diff --git a/test/transformer_test.dart b/test/transformer_test.dart
index 7f9b9f1bb40e89df57122c93e0e6dc24244a8bd8..1fb4bb2eb3a79259640bcbff4632f9a2ec96a2e8 100644
--- a/test/transformer_test.dart
+++ b/test/transformer_test.dart
@@ -126,21 +126,20 @@ _testInitializers(String args, String expected) {
}
/// Helper that applies the transform by creating mock assets.
-Future<String> _transform(String code) {
- return Chain.capture(() {
+Future _transform(String code) {
+ return Chain.capture(() async {
var id = new AssetId('foo', 'a/b/c.dart');
var asset = new Asset.fromString(id, code);
var transformer = new ObservableTransformer();
- return transformer.isPrimary(asset).then((isPrimary) {
- expect(isPrimary, isTrue);
- var transform = new _MockTransform(asset);
- return transformer.apply(transform).then((_) {
- expect(transform.outs, hasLength(2));
- expect(transform.outs[0].id, id);
- expect(transform.outs[1].id, id.addExtension('._buildLogs.1'));
- return transform.outs.first.readAsString();
- });
- });
+ bool isPrimary = await transformer.isPrimary(asset);
+ expect(isPrimary, isTrue);
+ var transform = new _MockTransform(asset);
+ await transformer.apply(transform);
+
+ expect(transform.outs, hasLength(2));
+ expect(transform.outs[0].id, id);
+ expect(transform.outs[1].id, id.addExtension('._buildLogs.1'));
+ return transform.outs.first.readAsString();
});
}
« no previous file with comments | « test/path_observer_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698