Index: sdk/lib/_internal/pub_generated/test/dependency_computer/no_dependencies_test.dart |
diff --git a/sdk/lib/_internal/pub_generated/test/dependency_computer/no_dependencies_test.dart b/sdk/lib/_internal/pub_generated/test/dependency_computer/no_dependencies_test.dart |
index f34cf3e4e940fb54d6c1ef22535d75941f2da09b..7aeb6ee70406860883f2d3c2f7ab7c8803bea7ef 100644 |
--- a/sdk/lib/_internal/pub_generated/test/dependency_computer/no_dependencies_test.dart |
+++ b/sdk/lib/_internal/pub_generated/test/dependency_computer/no_dependencies_test.dart |
@@ -1,10 +1,18 @@ |
+// Copyright (c) 2014, 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. |
+ |
library pub_tests; |
+ |
import 'package:scheduled_test/scheduled_test.dart'; |
+ |
import '../descriptor.dart' as d; |
import '../test_pub.dart'; |
import 'utils.dart'; |
+ |
void main() { |
initConfig(); |
+ |
integration("reports no dependencies if no transformers are used", () { |
d.dir(appPath, [d.pubspec({ |
"name": "myapp", |
@@ -14,9 +22,12 @@ void main() { |
} |
} |
})]).create(); |
+ |
d.dir("foo", [d.libPubspec("foo", "1.0.0")]).create(); |
+ |
expectDependencies({}); |
}); |
+ |
integration( |
"reports no dependencies if a transformer is used in a " |
"package that doesn't expose a transformer", |
@@ -30,15 +41,18 @@ void main() { |
}, |
"transformers": ["foo"] |
})]).create(); |
+ |
d.dir( |
"foo", |
[ |
d.libPubspec("foo", "1.0.0"), |
d.dir("lib", [d.file("foo.dart", transformer())])]).create(); |
+ |
expectDependencies({ |
"foo": [] |
}); |
}); |
+ |
integration("reports no dependencies for non-file/package imports", () { |
d.dir(appPath, [d.pubspec({ |
"name": "myapp", |
@@ -56,24 +70,29 @@ void main() { |
"myapp.dart", |
transformer( |
["dart:async", "http://dartlang.org/nonexistent.dart"]))])]).create(); |
+ |
d.dir( |
"foo", |
[ |
d.libPubspec("foo", "1.0.0"), |
d.dir("lib", [d.file("foo.dart", transformer())])]).create(); |
+ |
expectDependencies({ |
"myapp": [] |
}); |
}); |
+ |
integration("reports no dependencies for a single self transformer", () { |
d.dir(appPath, [d.pubspec({ |
"name": "myapp", |
"transformers": ["myapp"] |
}), d.dir("lib", [d.file("myapp.dart", transformer())])]).create(); |
+ |
expectDependencies({ |
"myapp": [] |
}); |
}); |
+ |
integration( |
"reports no dependencies if a transformer applies to files that " |
"aren't used by the exposed transformer", |
@@ -100,16 +119,19 @@ void main() { |
[ |
d.file("myapp.dart", ""), |
d.file("transformer.dart", transformer())])]).create(); |
+ |
d.dir( |
"foo", |
[ |
d.libPubspec("foo", "1.0.0"), |
d.dir("lib", [d.file("foo.dart", transformer())])]).create(); |
+ |
expectDependencies({ |
"myapp": [], |
"foo": [] |
}); |
}); |
+ |
integration( |
"reports no dependencies if a transformer applies to a " |
"dependency's files that aren't used by the exposed transformer", |
@@ -128,6 +150,7 @@ void main() { |
[ |
d.file("myapp.dart", ""), |
d.file("transformer.dart", transformer(["package:foo/foo.dart"]))])]).create(); |
+ |
d.dir("foo", [d.pubspec({ |
"name": "foo", |
"version": "1.0.0", |
@@ -140,11 +163,13 @@ void main() { |
d.dir( |
"lib", |
[d.file("foo.dart", ""), d.file("transformer.dart", transformer())])]).create(); |
+ |
expectDependencies({ |
'myapp': [], |
'foo': [] |
}); |
}); |
+ |
test("reports no dependencies on transformers in future phases", () { |
d.dir(appPath, [d.pubspec({ |
"name": "myapp", |
@@ -169,6 +194,7 @@ void main() { |
d.file("first.dart", transformer()), |
d.file("second.dart", transformer()), |
d.file("third.dart", transformer())])]).create(); |
+ |
expectDependencies({ |
'myapp/first': [], |
'myapp/second': [], |