Index: sdk/lib/_internal/pub_generated/test/validator/dependency_test.dart |
diff --git a/sdk/lib/_internal/pub_generated/test/validator/dependency_test.dart b/sdk/lib/_internal/pub_generated/test/validator/dependency_test.dart |
index 5f05d3d1b65d4455bc4119a4581bd55db2bee1ad..689fc66130cc7950ca248448f7b75e9767ba7b7e 100644 |
--- a/sdk/lib/_internal/pub_generated/test/validator/dependency_test.dart |
+++ b/sdk/lib/_internal/pub_generated/test/validator/dependency_test.dart |
@@ -59,9 +59,18 @@ setUpDependency(Map dep, {List<String> hostedVersions}) { |
main() { |
initConfig(); |
- integration('should consider a package valid if it looks normal', () { |
- d.validPackage.create(); |
- expectNoValidationError(dependency); |
+ group('should consider a package valid if it', () { |
+ integration('looks normal', () { |
+ d.validPackage.create(); |
+ expectNoValidationError(dependency); |
+ }); |
+ |
+ integration('has a ^ constraint with an appropriate SDK constraint', () { |
+ d.dir(appPath, [d.libPubspec("test_pkg", "1.0.0", deps: { |
+ "foo": "^1.2.3" |
+ }, sdk: ">=1.8.0 <2.0.0")]).create(); |
+ expectNoValidationError(dependency); |
+ }); |
}); |
group('should consider a package invalid if it', () { |
@@ -380,5 +389,23 @@ main() { |
expectDependencyValidationWarning(' foo: ">1.2.3 <2.0.0"'); |
}); |
}); |
+ |
+ group('has a ^ dependency', () { |
+ integration("without an SDK constraint", () { |
+ d.dir(appPath, [d.libPubspec("integration_pkg", "1.0.0", deps: { |
+ "foo": "^1.2.3" |
+ })]).create(); |
+ |
+ expectDependencyValidationError(' foo: ">=1.2.3 <2.0.0"'); |
+ }); |
+ |
+ integration("with a too-broad SDK constraint", () { |
+ d.dir(appPath, [d.libPubspec("test_pkg", "1.0.0", deps: { |
+ "foo": "^1.2.3" |
+ }, sdk: ">=1.5.0 <2.0.0")]).create(); |
+ |
+ expectDependencyValidationError(' foo: ">=1.2.3 <2.0.0"'); |
+ }); |
+ }); |
}); |
} |