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

Unified Diff: utils/tests/pub/install/pub_install_test.dart

Issue 13095015: Use backtracking when solving dependency constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise, update to latest corelib, and make backtracker default. Created 7 years, 8 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: utils/tests/pub/install/pub_install_test.dart
diff --git a/utils/tests/pub/install/pub_install_test.dart b/utils/tests/pub/install/pub_install_test.dart
index ad2370b7cd88cfd95d41eca0e8a4a37bc710aa4a..d683378bfd88b0181dc9b84f8e7e286ab1cb81e1 100644
--- a/utils/tests/pub/install/pub_install_test.dart
+++ b/utils/tests/pub/install/pub_install_test.dart
@@ -54,7 +54,7 @@ main() {
]).validate();
});
- integration('does not adds itself to the packages if it has no "lib" directory', () {
+ integration('does not add itself to the packages if it has no "lib" directory', () {
// The symlink should use the name in the pubspec, not the name of the
// directory.
d.dir(appPath, [
@@ -86,6 +86,40 @@ main() {
output: new RegExp(r"Dependencies installed!$"));
});
+ integration('reports a solver failure', () {
+ // myapp depends on foo and bar which both depend on baz with mismatched
+ // descriptions.
+ d.dir('deps', [
+ d.dir('foo', [
+ d.pubspec({"name": "foo", "dependencies": {
+ "baz": {"path": "../baz1"}
+ }})
+ ]),
+ d.dir('bar', [
+ d.pubspec({"name": "bar", "dependencies": {
+ "baz": {"path": "../baz2"}
+ }})
+ ]),
+ d.dir('baz1', [
+ d.libPubspec('baz', '0.0.0')
+ ]),
+ d.dir('baz2', [
+ d.libPubspec('baz', '0.0.0')
+ ])
+ ]).create();
+
+ d.dir(appPath, [
+ d.pubspec({"name": "myapp", "dependencies": {
+ "foo": {"path": "../deps/foo"},
+ "bar": {"path": "../deps/bar"}
+ }})
+ ]).create();
+
+ schedulePub(args: ['install'],
+ error: new RegExp(r"^Incompatible dependencies on 'baz':"),
+ exitCode: 1);
+ });
+
integration('does not warn if the root package lacks a "lib" directory', () {
d.dir(appPath, [
d.appPubspec([])

Powered by Google App Engine
This is Rietveld 408576698