| Index: utils/tests/pub/sdk_constraint_test.dart
|
| diff --git a/utils/tests/pub/sdk_constraint_test.dart b/utils/tests/pub/sdk_constraint_test.dart
|
| index 77ea8544e31459cd3da89da9044266a207cbb92b..db6c7692d6cb236b2a83c62dfe15ee9a52751da9 100644
|
| --- a/utils/tests/pub/sdk_constraint_test.dart
|
| +++ b/utils/tests/pub/sdk_constraint_test.dart
|
| @@ -4,8 +4,10 @@
|
|
|
| library check_sdk_test;
|
|
|
| +import '../../../pkg/scheduled_test/lib/scheduled_test.dart';
|
| +
|
| +import 'descriptor.dart' as d;
|
| import "test_pub.dart";
|
| -import "../../../pkg/unittest/lib/unittest.dart";
|
|
|
| main() {
|
| initConfig();
|
| @@ -17,20 +19,20 @@ main() {
|
| }
|
|
|
| integration("gives a friendly message if there are no constraints", () {
|
| - dir(appPath, [
|
| - pubspec({"name": "myapp"}),
|
| - ]).scheduleCreate();
|
| + d.dir(appPath, [
|
| + d.pubspec({"name": "myapp"}),
|
| + ]).create();
|
|
|
| schedulePub(args: [command], output: success);
|
| });
|
|
|
| integration("gives an error if the root package does not match", () {
|
| - dir(appPath, [
|
| - pubspec({
|
| + d.dir(appPath, [
|
| + d.pubspec({
|
| "name": "myapp",
|
| "environment": {"sdk": ">2.0.0"}
|
| })
|
| - ]).scheduleCreate();
|
| + ]).create();
|
|
|
| schedulePub(args: [command],
|
| error:
|
| @@ -45,17 +47,17 @@ main() {
|
|
|
| integration("gives an error if some dependencies do not match", () {
|
| // Using a path source, but this should be true of all sources.
|
| - dir("foo", [
|
| - libPubspec("foo", "0.0.1", sdk: ">0.1.3"),
|
| - libDir("foo")
|
| - ]).scheduleCreate();
|
| - dir("bar", [
|
| - libPubspec("bar", "0.0.1", sdk: ">0.1.1"),
|
| - libDir("bar")
|
| - ]).scheduleCreate();
|
| -
|
| - dir(appPath, [
|
| - pubspec({
|
| + d.dir("foo", [
|
| + d.libPubspec("foo", "0.0.1", sdk: ">0.1.3"),
|
| + d.libDir("foo")
|
| + ]).create();
|
| + d.dir("bar", [
|
| + d.libPubspec("bar", "0.0.1", sdk: ">0.1.1"),
|
| + d.libDir("bar")
|
| + ]).create();
|
| +
|
| + d.dir(appPath, [
|
| + d.pubspec({
|
| "name": "myapp",
|
| "dependencies": {
|
| "foo": {"path": "../foo"},
|
| @@ -63,7 +65,7 @@ main() {
|
| },
|
| "environment": {"sdk": ">2.0.0"}
|
| })
|
| - ]).scheduleCreate();
|
| + ]).create();
|
|
|
| schedulePub(args: [command],
|
| error:
|
| @@ -79,25 +81,25 @@ main() {
|
|
|
| integration("gives an error if a transitive dependency doesn't match", () {
|
| // Using a path source, but this should be true of all sources.
|
| - dir("foo", [
|
| - libPubspec("foo", "0.0.1", deps: [
|
| + d.dir("foo", [
|
| + d.libPubspec("foo", "0.0.1", deps: [
|
| {"path": "../bar"}
|
| ]),
|
| - libDir("foo")
|
| - ]).scheduleCreate();
|
| - dir("bar", [
|
| - libPubspec("bar", "0.0.1", sdk: "<0.1.1"),
|
| - libDir("bar")
|
| - ]).scheduleCreate();
|
| -
|
| - dir(appPath, [
|
| - pubspec({
|
| + d.libDir("foo")
|
| + ]).create();
|
| + d.dir("bar", [
|
| + d.libPubspec("bar", "0.0.1", sdk: "<0.1.1"),
|
| + d.libDir("bar")
|
| + ]).create();
|
| +
|
| + d.dir(appPath, [
|
| + d.pubspec({
|
| "name": "myapp",
|
| "dependencies": {
|
| "foo": {"path": "../foo"}
|
| }
|
| })
|
| - ]).scheduleCreate();
|
| + ]).create();
|
|
|
| schedulePub(args: [command],
|
| error:
|
| @@ -112,22 +114,22 @@ main() {
|
|
|
| integration("handles a circular dependency on the root package", () {
|
| // Using a path source, but this should be true of all sources.
|
| - dir("foo", [
|
| - libPubspec("foo", "0.0.1", sdk: ">3.0.0", deps: [
|
| + d.dir("foo", [
|
| + d.libPubspec("foo", "0.0.1", sdk: ">3.0.0", deps: [
|
| {"path": "../myapp"}
|
| ]),
|
| - libDir("foo")
|
| - ]).scheduleCreate();
|
| + d.libDir("foo")
|
| + ]).create();
|
|
|
| - dir(appPath, [
|
| - pubspec({
|
| + d.dir(appPath, [
|
| + d.pubspec({
|
| "name": "myapp",
|
| "dependencies": {
|
| "foo": {"path": "../foo"}
|
| },
|
| "environment": {"sdk": ">2.0.0"}
|
| })
|
| - ]).scheduleCreate();
|
| + ]).create();
|
|
|
| schedulePub(args: [command],
|
| error:
|
|
|