| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library pub_tests; | 5 library pub_tests; |
| 6 | 6 |
| 7 import '../descriptor.dart' as d; | 7 import '../descriptor.dart' as d; |
| 8 import '../test_pub.dart'; | 8 import '../test_pub.dart'; |
| 9 import '../serve/utils.dart'; | 9 import '../serve/utils.dart'; |
| 10 | 10 |
| 11 main() { | 11 main() { |
| 12 initConfig(); | |
| 13 withBarbackVersions("any", () { | 12 withBarbackVersions("any", () { |
| 14 integration("loads different configurations from the same isolate", () { | 13 integration("loads different configurations from the same isolate", () { |
| 15 // If different configurations are loaded from different isolates, a | 14 // If different configurations are loaded from different isolates, a |
| 16 // transformer can end up being loaded twice. It's even possible for the | 15 // transformer can end up being loaded twice. It's even possible for the |
| 17 // second load to use code that's transformed by the first, which is | 16 // second load to use code that's transformed by the first, which is |
| 18 // really bad. This tests sets up such a scenario. | 17 // really bad. This tests sets up such a scenario. |
| 19 // | 18 // |
| 20 // The foo package has two self-transformers: foo/first and foo/second, | 19 // The foo package has two self-transformers: foo/first and foo/second, |
| 21 // loaded in that order. This means that *no instances of foo/first* | 20 // loaded in that order. This means that *no instances of foo/first* |
| 22 // should ever have their code transformed by foo/second. | 21 // should ever have their code transformed by foo/second. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 'const TOKEN = "(myapp/first, foo/first in myapp)";'); | 78 'const TOKEN = "(myapp/first, foo/first in myapp)";'); |
| 80 | 79 |
| 81 // foo/second should be transformed by only foo/first. | 80 // foo/second should be transformed by only foo/first. |
| 82 requestShouldSucceed("second.dart", | 81 requestShouldSucceed("second.dart", |
| 83 'const TOKEN = "(myapp/second, (foo/second, foo/first in foo))";'); | 82 'const TOKEN = "(myapp/second, (foo/second, foo/first in foo))";'); |
| 84 | 83 |
| 85 endPubServe(); | 84 endPubServe(); |
| 86 }); | 85 }); |
| 87 }); | 86 }); |
| 88 } | 87 } |
| OLD | NEW |