Chromium Code Reviews

Side by Side Diff: sdk/lib/_internal/pub_generated/test/pubspec_test.dart

Issue 602253002: Use pub_semver package in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 library pubspec_test; 1 library pubspec_test;
2 import 'dart:async'; 2 import 'dart:async';
3 import 'package:pub_semver/pub_semver.dart';
3 import 'package:unittest/unittest.dart'; 4 import 'package:unittest/unittest.dart';
4 import '../lib/src/package.dart'; 5 import '../lib/src/package.dart';
5 import '../lib/src/pubspec.dart'; 6 import '../lib/src/pubspec.dart';
6 import '../lib/src/source.dart'; 7 import '../lib/src/source.dart';
7 import '../lib/src/source_registry.dart'; 8 import '../lib/src/source_registry.dart';
8 import '../lib/src/version.dart';
9 import 'test_pub.dart'; 9 import 'test_pub.dart';
10 class MockSource extends Source { 10 class MockSource extends Source {
11 final String name = "mock"; 11 final String name = "mock";
12 Future<Pubspec> doDescribe(PackageId id) => 12 Future<Pubspec> doDescribe(PackageId id) =>
13 throw new UnsupportedError("Cannot describe mock packages."); 13 throw new UnsupportedError("Cannot describe mock packages.");
14 Future get(PackageId id, String symlink) => 14 Future get(PackageId id, String symlink) =>
15 throw new UnsupportedError("Cannot get a mock package."); 15 throw new UnsupportedError("Cannot get a mock package.");
16 Future<String> getDirectory(PackageId id) => 16 Future<String> getDirectory(PackageId id) =>
17 throw new UnsupportedError("Cannot get the directory for mock packages."); 17 throw new UnsupportedError("Cannot get the directory for mock packages.");
18 dynamic parseDescription(String filePath, description, {bool fromLockFile: 18 dynamic parseDescription(String filePath, description, {bool fromLockFile:
(...skipping 412 matching lines...)
431 test("uses the key if the value is null", () { 431 test("uses the key if the value is null", () {
432 var pubspec = new Pubspec.parse(''' 432 var pubspec = new Pubspec.parse('''
433 executables: 433 executables:
434 command: 434 command:
435 ''', sources); 435 ''', sources);
436 expect(pubspec.executables['command'], equals('command')); 436 expect(pubspec.executables['command'], equals('command'));
437 }); 437 });
438 }); 438 });
439 }); 439 });
440 } 440 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub_generated/test/preprocess_test.dart ('k') | sdk/lib/_internal/pub_generated/test/serve_packages.dart » ('j') | no next file with comments »

Powered by Google App Engine