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

Unified Diff: sdk/lib/_internal/pub/test/implicit_barback_dependency_test.dart

Issue 1165473002: Start pulling pub from its own repo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review changes Created 5 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
Index: sdk/lib/_internal/pub/test/implicit_barback_dependency_test.dart
diff --git a/sdk/lib/_internal/pub/test/implicit_barback_dependency_test.dart b/sdk/lib/_internal/pub/test/implicit_barback_dependency_test.dart
deleted file mode 100644
index 0d16e51cd8c3ee09f179c89c5d87755409d793f8..0000000000000000000000000000000000000000
--- a/sdk/lib/_internal/pub/test/implicit_barback_dependency_test.dart
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:pub_semver/pub_semver.dart';
-
-import 'descriptor.dart' as d;
-import 'test_pub.dart';
-import '../lib/src/barback.dart' as barback;
-
-main() {
- initConfig();
-
- var constraint = barback.pubConstraints["barback"];
- var current = constraint.min.toString();
- var previous = new Version(constraint.min.major, constraint.min.minor - 1, 0)
- .toString();
- var nextPatch = constraint.min.nextPatch.toString();
- var max = constraint.max.toString();
-
- var sourceSpanVersion = barback.pubConstraints["source_span"].min.toString();
- var stackTraceVersion = barback.pubConstraints["stack_trace"].min.toString();
-
- forBothPubGetAndUpgrade((command) {
- integration("implicitly constrains barback to versions pub supports", () {
- servePackages((builder) {
- builder.serve("barback", previous);
- builder.serve("barback", current);
- builder.serve("barback", nextPatch);
- builder.serve("barback", max);
- builder.serve("source_span", sourceSpanVersion);
- builder.serve("stack_trace", stackTraceVersion);
- });
-
- d.appDir({
- "barback": "any"
- }).create();
-
- pubCommand(command);
-
- d.packagesDir({
- "barback": nextPatch
- }).validate();
- });
-
- integration("discovers transitive dependency on barback", () {
- servePackages((builder) {
- builder.serve("barback", previous);
- builder.serve("barback", current);
- builder.serve("barback", nextPatch);
- builder.serve("barback", max);
- builder.serve("source_span", sourceSpanVersion);
- builder.serve("stack_trace", stackTraceVersion);
- });
-
- d.dir("foo", [
- d.libDir("foo", "foo 0.0.1"),
- d.libPubspec("foo", "0.0.1", deps: {
- "barback": "any"
- })
- ]).create();
-
- d.appDir({
- "foo": {"path": "../foo"}
- }).create();
-
- pubCommand(command);
-
- d.packagesDir({
- "barback": nextPatch,
- "foo": "0.0.1"
- }).validate();
- });
-
- integration("pub's implicit constraint uses the same source and "
- "description as a dependency override", () {
- servePackages((builder) {
- builder.serve("source_span", sourceSpanVersion);
- builder.serve("stack_trace", stackTraceVersion);
- });
-
- d.dir('barback', [
- d.libDir('barback', 'barback $current'),
- d.libPubspec('barback', current),
- ]).create();
-
- d.dir(appPath, [
- d.pubspec({
- "name": "myapp",
- "dependency_overrides": {
- "barback": {"path": "../barback"}
- }
- })
- ]).create();
-
- pubCommand(command);
-
- d.packagesDir({
- "barback": current
- }).validate();
- });
- });
-
- integration("unlock if the locked version doesn't meet pub's constraint", () {
- servePackages((builder) {
- builder.serve("barback", previous);
- builder.serve("barback", current);
- builder.serve("source_span", sourceSpanVersion);
- builder.serve("stack_trace", stackTraceVersion);
- });
-
- d.appDir({"barback": "any"}).create();
-
- // Hand-create a lockfile to pin barback to an older version.
- createLockFile("myapp", hosted: {
- "barback": previous
- });
-
- pubGet();
-
- // It should be upgraded.
- d.packagesDir({
- "barback": current
- }).validate();
- });
-
- integration("includes pub in the error if a solve failed because there "
- "is no version available", () {
- servePackages((builder) {
- builder.serve("barback", previous);
- builder.serve("source_span", sourceSpanVersion);
- builder.serve("stack_trace", stackTraceVersion);
- });
-
- d.appDir({"barback": "any"}).create();
-
- pubGet(error: """
-Package barback has no versions that match >=$current <$max derived from:
-- myapp depends on version any
-- pub itself depends on version >=$current <$max""");
- });
-
- integration("includes pub in the error if a solve failed because there "
- "is a disjoint constraint", () {
- servePackages((builder) {
- builder.serve("barback", previous);
- builder.serve("barback", current);
- builder.serve("source_span", sourceSpanVersion);
- builder.serve("stack_trace", stackTraceVersion);
- });
-
- d.appDir({"barback": previous}).create();
-
- pubGet(error: """
-Incompatible version constraints on barback:
-- myapp depends on version $previous
-- pub itself depends on version >=$current <$max""");
- });
-}

Powered by Google App Engine
This is Rietveld 408576698