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

Side by Side Diff: test/pubspec_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/pub_test.dart ('k') | test/run/doesnt_load_an_unnecessary_transformer_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library pubspec_test; 5 library pubspec_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:pub/src/package.dart'; 9 import 'package:pub/src/package.dart';
10 import 'package:pub/src/pubspec.dart'; 10 import 'package:pub/src/pubspec.dart';
11 import 'package:pub/src/source.dart'; 11 import 'package:pub/src/source.dart';
12 import 'package:pub/src/source/path.dart'; 12 import 'package:pub/src/source/path.dart';
13 import 'package:pub/src/source_registry.dart'; 13 import 'package:pub/src/source_registry.dart';
14 import 'package:pub_semver/pub_semver.dart'; 14 import 'package:pub_semver/pub_semver.dart';
15 import 'package:test/test.dart'; 15 import 'package:test/test.dart';
16 16
17 import 'test_pub.dart';
18
19 class MockSource extends Source { 17 class MockSource extends Source {
20 final String name = "mock"; 18 final String name = "mock";
21 19
22 Future<List<PackageId>> doGetVersions(PackageRef ref) => 20 Future<List<PackageId>> doGetVersions(PackageRef ref) =>
23 throw new UnsupportedError("Cannot get mock package versions."); 21 throw new UnsupportedError("Cannot get mock package versions.");
24 22
25 Future<Pubspec> doDescribe(PackageId id) => throw new UnsupportedError( 23 Future<Pubspec> doDescribe(PackageId id) => throw new UnsupportedError(
26 "Cannot describe mock packages."); 24 "Cannot describe mock packages.");
27 25
28 Future get(PackageId id, String symlink) => throw new UnsupportedError( 26 Future get(PackageId id, String symlink) => throw new UnsupportedError(
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 test("uses the key if the value is null", () { 533 test("uses the key if the value is null", () {
536 var pubspec = new Pubspec.parse(''' 534 var pubspec = new Pubspec.parse('''
537 executables: 535 executables:
538 command: 536 command:
539 ''', sources); 537 ''', sources);
540 expect(pubspec.executables['command'], equals('command')); 538 expect(pubspec.executables['command'], equals('command'));
541 }); 539 });
542 }); 540 });
543 }); 541 });
544 } 542 }
OLDNEW
« no previous file with comments | « test/pub_test.dart ('k') | test/run/doesnt_load_an_unnecessary_transformer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698