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

Side by Side Diff: test/run/doesnt_load_an_unnecessary_transformer_test.dart

Issue 1556243002: Fix analyzer hints and warnings in test/. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 4 years, 11 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 | « test/pubspec_test.dart ('k') | test/run/forwards_signal_posix_test.dart » ('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 import '../descriptor.dart' as d; 5 import '../descriptor.dart' as d;
6 import '../test_pub.dart'; 6 import '../test_pub.dart';
7 import '../serve/utils.dart';
8 7
9 const TRANSFORMER = """ 8 const TRANSFORMER = """
10 import 'dart:async'; 9 import 'dart:async';
11 10
12 import 'package:barback/barback.dart'; 11 import 'package:barback/barback.dart';
13 12
14 class BrokenTransformer extends Transformer { 13 class BrokenTransformer extends Transformer {
15 RewriteTransformer.asPlugin() { 14 RewriteTransformer.asPlugin() {
16 throw 'This transformer is broken!'; 15 throw 'This transformer is broken!';
17 } 16 }
(...skipping 28 matching lines...) Expand all
46 pubGet(); 45 pubGet();
47 46
48 // This shouldn't load the transformer, since it doesn't transform 47 // This shouldn't load the transformer, since it doesn't transform
49 // anything that the entrypoint imports. If it did load the transformer, 48 // anything that the entrypoint imports. If it did load the transformer,
50 // we'd know since it would throw an exception. 49 // we'd know since it would throw an exception.
51 var pub = pubRun(args: ["bin/hi"]); 50 var pub = pubRun(args: ["bin/hi"]);
52 pub.stdout.expect("Hello!"); 51 pub.stdout.expect("Hello!");
53 pub.shouldExit(); 52 pub.shouldExit();
54 }); 53 });
55 } 54 }
OLDNEW
« no previous file with comments | « test/pubspec_test.dart ('k') | test/run/forwards_signal_posix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698