OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS 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 import 'package:scheduled_test/scheduled_test.dart'; | 5 import 'package:scheduled_test/scheduled_test.dart'; |
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 | 9 |
10 const MAIN = """ | 10 const MAIN = """ |
(...skipping 22 matching lines...) Expand all Loading... |
33 fn() => print("b"); | 33 fn() => print("b"); |
34 """; | 34 """; |
35 | 35 |
36 main() { | 36 main() { |
37 initConfig(); | 37 initConfig(); |
38 integration("compiles deferred libraries to separate outputs", () { | 38 integration("compiles deferred libraries to separate outputs", () { |
39 // Dart2js can take a long time to compile dart code, so we increase the | 39 // Dart2js can take a long time to compile dart code, so we increase the |
40 // timeout to cope with that. | 40 // timeout to cope with that. |
41 currentSchedule.timeout *= 3; | 41 currentSchedule.timeout *= 3; |
42 | 42 |
43 d.dir(appPath, [ | 43 d.dir( |
44 d.appPubspec(), | 44 appPath, |
45 d.dir('web', [ | 45 [ |
46 d.file('main.dart', MAIN), | 46 d.appPubspec(), |
47 d.file('a.dart', A), | 47 d.dir( |
48 d.file('b.dart', B) | 48 'web', |
49 ]) | 49 [ |
50 ]).create(); | 50 d.file('main.dart', MAIN), |
| 51 d.file('a.dart', A), |
| 52 d.file('b.dart', B)])]).create(); |
51 | 53 |
52 schedulePub(args: ["build"], | 54 schedulePub( |
| 55 args: ["build"], |
53 output: new RegExp(r'Built 3 files to "build".')); | 56 output: new RegExp(r'Built 3 files to "build".')); |
54 | 57 |
55 d.dir(appPath, [ | 58 d.dir( |
56 d.dir('build', [ | 59 appPath, |
57 d.dir('web', [ | 60 [ |
58 d.matcherFile('main.dart.js', isNot(isEmpty)), | 61 d.dir( |
59 d.matcherFile('main.dart.js_1.part.js', isNot(isEmpty)), | 62 'build', |
60 d.matcherFile('main.dart.js_2.part.js', isNot(isEmpty)), | 63 [ |
61 ]) | 64 d.dir( |
62 ]) | 65 'web', |
63 ]).validate(); | 66 [ |
| 67 d.matcherFile('main.dart.js', isNot(isEmpty)), |
| 68 d.matcherFile('main.dart.js_1.part.js', isNot(isEmpt
y)), |
| 69 d.matcherFile('main.dart.js_2.part.js', isNot(isEmpt
y)),])])]).validate(); |
64 }); | 70 }); |
65 } | 71 } |
OLD | NEW |