Chromium Code Reviews

Unified Diff: test/transformer/loads_different_configurations_from_the_same_isolate_test.dart

Issue 1530353002: Drop support for older Barback versions. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: test/transformer/loads_different_configurations_from_the_same_isolate_test.dart
diff --git a/test/transformer/loads_different_configurations_from_the_same_isolate_test.dart b/test/transformer/loads_different_configurations_from_the_same_isolate_test.dart
index c6b2a21843c459b0f3c10e4ec9f0780ff13eb650..580886e6bfd04cfc7e69a295302953df45a3d068 100644
--- a/test/transformer/loads_different_configurations_from_the_same_isolate_test.dart
+++ b/test/transformer/loads_different_configurations_from_the_same_isolate_test.dart
@@ -9,79 +9,77 @@ import '../test_pub.dart';
import '../serve/utils.dart';
main() {
- withBarbackVersions("any", () {
- integration("loads different configurations from the same isolate", () {
- // If different configurations are loaded from different isolates, a
- // transformer can end up being loaded twice. It's even possible for the
- // second load to use code that's transformed by the first, which is
- // really bad. This tests sets up such a scenario.
- //
- // The foo package has two self-transformers: foo/first and foo/second,
- // loaded in that order. This means that *no instances of foo/first*
- // should ever have their code transformed by foo/second.
- //
- // The myapp package also has a reference to foo/first. This reference has
- // a different configuration than foo's, which means that if it's loaded
- // in a separate isolate, it will be loaded after all of foo's
- // transformers have run. This means that foo/first.dart will have been
- // transformed by foo/first and foo/second, causing it to have different
- // code than the previous instance. This tests asserts that that doesn't
- // happen.
+ integration("loads different configurations from the same isolate", () {
+ // If different configurations are loaded from different isolates, a
+ // transformer can end up being loaded twice. It's even possible for the
+ // second load to use code that's transformed by the first, which is
+ // really bad. This tests sets up such a scenario.
+ //
+ // The foo package has two self-transformers: foo/first and foo/second,
+ // loaded in that order. This means that *no instances of foo/first*
+ // should ever have their code transformed by foo/second.
+ //
+ // The myapp package also has a reference to foo/first. This reference has
+ // a different configuration than foo's, which means that if it's loaded
+ // in a separate isolate, it will be loaded after all of foo's
+ // transformers have run. This means that foo/first.dart will have been
+ // transformed by foo/first and foo/second, causing it to have different
+ // code than the previous instance. This tests asserts that that doesn't
+ // happen.
- d.dir("foo", [
- d.pubspec({
- "name": "foo",
- "version": "1.0.0",
- "transformers": [
- {"foo/first": {"addition": " in foo"}},
- "foo/second"
- ]
- }),
- d.dir("lib", [
- d.file("first.dart", dartTransformer('foo/first')),
- d.file("second.dart", dartTransformer('foo/second'))
- ])
- ]).create();
+ d.dir("foo", [
+ d.pubspec({
+ "name": "foo",
+ "version": "1.0.0",
+ "transformers": [
+ {"foo/first": {"addition": " in foo"}},
+ "foo/second"
+ ]
+ }),
+ d.dir("lib", [
+ d.file("first.dart", dartTransformer('foo/first')),
+ d.file("second.dart", dartTransformer('foo/second'))
+ ])
+ ]).create();
- d.dir(appPath, [
- d.pubspec({
- "name": "myapp",
- "transformers": [
- {
- "foo/first": {
- "addition": " in myapp",
- "\$include": "web/first.dart"
- }
- },
- {"foo/second": {"\$include": "web/second.dart"}}
- ],
- "dependencies": {'foo': {'path': '../foo'}}
- }),
- d.dir("web", [
- // This is transformed by foo/first. It's used to see which
- // transformers ran on foo/first.
- d.file("first.dart", 'const TOKEN = "myapp/first";'),
+ d.dir(appPath, [
+ d.pubspec({
+ "name": "myapp",
+ "transformers": [
+ {
+ "foo/first": {
+ "addition": " in myapp",
+ "\$include": "web/first.dart"
+ }
+ },
+ {"foo/second": {"\$include": "web/second.dart"}}
+ ],
+ "dependencies": {'foo': {'path': '../foo'}}
+ }),
+ d.dir("web", [
+ // This is transformed by foo/first. It's used to see which
+ // transformers ran on foo/first.
+ d.file("first.dart", 'const TOKEN = "myapp/first";'),
- // This is transformed by foo/second. It's used to see which
- // transformers ran on foo/second.
- d.file("second.dart", 'const TOKEN = "myapp/second";')
- ])
- ]).create();
+ // This is transformed by foo/second. It's used to see which
+ // transformers ran on foo/second.
+ d.file("second.dart", 'const TOKEN = "myapp/second";')
+ ])
+ ]).create();
- createLockFile('myapp', sandbox: ['foo'], pkg: ['barback']);
+ createLockFile('myapp', sandbox: ['foo'], pkg: ['barback']);
- pubServe();
+ pubServe();
- // The version of foo/first used on myapp should have myapp's
- // configuration and shouldn't be transformed by foo/second.
- requestShouldSucceed("first.dart",
- 'const TOKEN = "(myapp/first, foo/first in myapp)";');
+ // The version of foo/first used on myapp should have myapp's
+ // configuration and shouldn't be transformed by foo/second.
+ requestShouldSucceed("first.dart",
+ 'const TOKEN = "(myapp/first, foo/first in myapp)";');
- // foo/second should be transformed by only foo/first.
- requestShouldSucceed("second.dart",
- 'const TOKEN = "(myapp/second, (foo/second, foo/first in foo))";');
+ // foo/second should be transformed by only foo/first.
+ requestShouldSucceed("second.dart",
+ 'const TOKEN = "(myapp/second, (foo/second, foo/first in foo))";');
- endPubServe();
- });
- });
+ endPubServe();
+ });
}

Powered by Google App Engine