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

Side by Side Diff: utils/tests/pub/sdk_constraint_test.dart

Issue 12790006: Remove support for SDK dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 check_sdk_test; 5 library check_sdk_test;
6 6
7 import "test_pub.dart"; 7 import "test_pub.dart";
8 import "../../../pkg/unittest/lib/unittest.dart"; 8 import "../../../pkg/unittest/lib/unittest.dart";
9 9
10 main() { 10 main() {
(...skipping 26 matching lines...) Expand all
37 """ 37 """
38 Some packages that were installed are not compatible with your SDK v ersion 0.1.2+3 and may not work: 38 Some packages that were installed are not compatible with your SDK v ersion 0.1.2+3 and may not work:
39 - 'myapp' requires >2.0.0 39 - 'myapp' requires >2.0.0
40 40
41 You may be able to resolve this by upgrading to the latest Dart SDK 41 You may be able to resolve this by upgrading to the latest Dart SDK
42 or adding a version constraint to use an older version of a package. 42 or adding a version constraint to use an older version of a package.
43 """); 43 """);
44 }); 44 });
45 45
46 integration("gives an error if some dependencies do not match", () { 46 integration("gives an error if some dependencies do not match", () {
47 // Using an SDK source, but this should be true of all sources. 47 // Using a path source, but this should be true of all sources.
48 dir(sdkPath, [ 48 dir("foo", [
49 dir("pkg", [ 49 libPubspec("foo", "0.0.1", sdk: ">0.1.3"),
50 dir("foo", [ 50 libDir("foo")
51 libPubspec("foo", "0.0.1", sdk: ">0.1.3"), 51 ]).scheduleCreate();
52 libDir("foo") 52 dir("bar", [
53 ]), 53 libPubspec("bar", "0.0.1", sdk: ">0.1.1"),
54 dir("bar", [ 54 libDir("bar")
55 libPubspec("bar", "0.0.1", sdk: ">0.1.1"),
56 libDir("bar")
57 ])
58 ])
59 ]).scheduleCreate(); 55 ]).scheduleCreate();
60 56
61 dir(appPath, [ 57 dir(appPath, [
62 pubspec({ 58 pubspec({
63 "name": "myapp", 59 "name": "myapp",
64 "dependencies": { 60 "dependencies": {
65 "foo": { "sdk": "foo" }, 61 "foo": {"path": "../foo"},
66 "bar": { "sdk": "bar" } 62 "bar": {"path": "../bar"}
67 }, 63 },
68 "environment": {"sdk": ">2.0.0"} 64 "environment": {"sdk": ">2.0.0"}
69 }) 65 })
70 ]).scheduleCreate(); 66 ]).scheduleCreate();
71 67
72 schedulePub(args: [command], 68 schedulePub(args: [command],
73 error: 69 error:
74 """ 70 """
75 Some packages that were installed are not compatible with your SDK v ersion 0.1.2+3 and may not work: 71 Some packages that were installed are not compatible with your SDK v ersion 0.1.2+3 and may not work:
76 - 'myapp' requires >2.0.0 72 - 'myapp' requires >2.0.0
77 - 'foo' requires >0.1.3 73 - 'foo' requires >0.1.3
78 74
79 You may be able to resolve this by upgrading to the latest Dart SDK 75 You may be able to resolve this by upgrading to the latest Dart SDK
80 or adding a version constraint to use an older version of a package. 76 or adding a version constraint to use an older version of a package.
81 """); 77 """);
82 }); 78 });
83 79
84 integration("gives an error if a transitive dependency doesn't match", () { 80 integration("gives an error if a transitive dependency doesn't match", () {
85 // Using an SDK source, but this should be true of all sources. 81 // Using a path source, but this should be true of all sources.
86 dir(sdkPath, [ 82 dir("foo", [
87 dir("pkg", [ 83 libPubspec("foo", "0.0.1", deps: [
88 dir("foo", [ 84 {"path": "../bar"}
89 libPubspec("foo", "0.0.1", deps: [ 85 ]),
90 {"sdk": "bar"} 86 libDir("foo")
91 ]), 87 ]).scheduleCreate();
92 libDir("foo") 88 dir("bar", [
93 ]), 89 libPubspec("bar", "0.0.1", sdk: "<0.1.1"),
94 dir("bar", [ 90 libDir("bar")
95 libPubspec("bar", "0.0.1", sdk: "<0.1.1"),
96 libDir("bar")
97 ])
98 ])
99 ]).scheduleCreate(); 91 ]).scheduleCreate();
100 92
101 dir(appPath, [ 93 dir(appPath, [
102 pubspec({ 94 pubspec({
103 "name": "myapp", 95 "name": "myapp",
104 "dependencies": { 96 "dependencies": {
105 "foo": { "sdk": "foo" } 97 "foo": {"path": "../foo"}
106 } 98 }
107 }) 99 })
108 ]).scheduleCreate(); 100 ]).scheduleCreate();
109 101
110 schedulePub(args: [command], 102 schedulePub(args: [command],
111 error: 103 error:
112 """ 104 """
113 Some packages that were installed are not compatible with your SDK v ersion 0.1.2+3 and may not work: 105 Some packages that were installed are not compatible with your SDK v ersion 0.1.2+3 and may not work:
114 - 'bar' requires <0.1.1 106 - 'bar' requires <0.1.1
115 107
116 You may be able to resolve this by upgrading to the latest Dart SDK 108 You may be able to resolve this by upgrading to the latest Dart SDK
117 or adding a version constraint to use an older version of a package. 109 or adding a version constraint to use an older version of a package.
118 """); 110 """);
119 }); 111 });
120 112
121 integration("handles a circular dependency on the root package", () { 113 integration("handles a circular dependency on the root package", () {
122 // Using an SDK source, but this should be true of all sources. 114 // Using a path source, but this should be true of all sources.
123 dir(sdkPath, [ 115 dir("foo", [
124 dir("pkg", [ 116 libPubspec("foo", "0.0.1", sdk: ">3.0.0", deps: [
125 dir("foo", [ 117 {"path": "../myapp"}
126 libPubspec("foo", "0.0.1", sdk: ">3.0.0", deps: [ 118 ]),
127 {"sdk": "myapp"} 119 libDir("foo")
128 ]),
129 libDir("foo")
130 ])
131 ])
132 ]).scheduleCreate(); 120 ]).scheduleCreate();
133 121
134 dir(appPath, [ 122 dir(appPath, [
135 pubspec({ 123 pubspec({
136 "name": "myapp", 124 "name": "myapp",
137 "dependencies": { 125 "dependencies": {
138 "foo": { "sdk": "foo" } 126 "foo": {"path": "../foo"}
139 }, 127 },
140 "environment": {"sdk": ">2.0.0"} 128 "environment": {"sdk": ">2.0.0"}
141 }) 129 })
142 ]).scheduleCreate(); 130 ]).scheduleCreate();
143 131
144 schedulePub(args: [command], 132 schedulePub(args: [command],
145 error: 133 error:
146 """ 134 """
147 Some packages that were installed are not compatible with your SDK v ersion 0.1.2+3 and may not work: 135 Some packages that were installed are not compatible with your SDK v ersion 0.1.2+3 and may not work:
148 - 'myapp' requires >2.0.0 136 - 'myapp' requires >2.0.0
149 - 'foo' requires >3.0.0 137 - 'foo' requires >3.0.0
150 138
151 You may be able to resolve this by upgrading to the latest Dart SDK 139 You may be able to resolve this by upgrading to the latest Dart SDK
152 or adding a version constraint to use an older version of a package. 140 or adding a version constraint to use an older version of a package.
153 """); 141 """);
154 }); 142 });
155 } 143 }
156 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698