Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: sdk/lib/_internal/pub/test/build/compiles_entrypoints_in_benchmark_test.dart

Issue 141113011: Support directories other than "web" in pub build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 main() { 10 main() {
11 initConfig(); 11 initConfig();
12 12
13 integration("compiles Dart entrypoints to JS", () { 13 integration("compiles Dart entrypoints in benchmark/ to JS", () {
14 // Dart2js can take a long time to compile dart code, so we increase the 14 // Dart2js can take a long time to compile dart code, so we increase the
15 // timeout to cope with that. 15 // timeout to cope with that.
16 currentSchedule.timeout *= 3; 16 currentSchedule.timeout *= 3;
17 17
18 d.dir(appPath, [ 18 d.dir(appPath, [
19 d.appPubspec(), 19 d.appPubspec(),
20 d.dir('web', [ 20 d.dir('benchmark', [
21 d.file('file.dart', 'void main() => print("hello");'), 21 d.file('file.dart', 'void main() => print("hello");'),
22 d.file('lib.dart', 'void foo() => print("hello");'), 22 d.file('lib.dart', 'void foo() => print("hello");'),
23 d.dir('subdir', [ 23 d.dir('subdir', [
24 d.file('subfile.dart', 'void main() => print("ping");') 24 d.file('subfile.dart', 'void main() => print("ping");')
25 ]) 25 ])
26 ]) 26 ])
27 ]).create(); 27 ]).create();
28 28
29 // TODO(rnystrom): If we flesh out the command-line output, validate that 29 schedulePub(args: ["build", "*"],
30 // here.
31 schedulePub(args: ["build"],
32 output: new RegExp(r"Built 6 files!"), 30 output: new RegExp(r"Built 6 files!"),
33 exitCode: 0); 31 exitCode: 0);
34 32
35 d.dir(appPath, [ 33 d.dir(appPath, [
36 d.dir('build', [ 34 d.dir('build', [
37 d.matcherFile('file.dart.js', isNot(isEmpty)), 35 d.dir('benchmark', [
38 d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)), 36 d.matcherFile('file.dart.js', isNot(isEmpty)),
39 d.matcherFile('file.dart.js.map', isNot(isEmpty)), 37 d.matcherFile('file.dart.precompiled.js', isNot(isEmpty)),
40 d.nothing('file.dart'), 38 d.matcherFile('file.dart.js.map', isNot(isEmpty)),
41 d.nothing('lib.dart'), 39 d.nothing('file.dart'),
42 d.dir('subdir', [ 40 d.nothing('lib.dart'),
43 d.matcherFile('subfile.dart.js', isNot(isEmpty)), 41 d.dir('subdir', [
44 d.matcherFile('subfile.dart.precompiled.js', isNot(isEmpty)), 42 d.matcherFile('subfile.dart.js', isNot(isEmpty)),
45 d.matcherFile('subfile.dart.js.map', isNot(isEmpty)), 43 d.matcherFile('subfile.dart.precompiled.js', isNot(isEmpty)),
46 d.nothing('subfile.dart') 44 d.matcherFile('subfile.dart.js.map', isNot(isEmpty)),
45 d.nothing('subfile.dart')
46 ])
47 ]) 47 ])
48 ]) 48 ])
49 ]).validate(); 49 ]).validate();
50 }); 50 });
51 } 51 }
nweiz 2014/01/28 03:21:51 This test is confusing. If you're testing that "be
Bob Nystrom 2014/01/28 23:02:04 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698