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

Side by Side Diff: pkg/args/example/test_runner.dart

Issue 11362139: Update library syntax in pkg files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | pkg/args/lib/args.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * This is an example of converting the args in test.dart to use this API. 6 * This is an example of converting the args in test.dart to use this API.
7 * It shows what it looks like to build an [ArgParser] and then, when the code 7 * It shows what it looks like to build an [ArgParser] and then, when the code
8 * is run, demonstrates what the generated usage text looks like. 8 * is run, demonstrates what the generated usage text looks like.
9 */ 9 */
10 #library('example'); 10 library example;
11 11
12 #import('dart:io'); 12 import 'dart:io';
13 13
14 #import('package:args/args.dart'); 14 import 'package:args/args.dart';
15 15
16 main() { 16 main() {
17 var parser = new ArgParser(); 17 var parser = new ArgParser();
18 18
19 parser.addOption('mode', abbr: 'm', defaultsTo: 'debug', 19 parser.addOption('mode', abbr: 'm', defaultsTo: 'debug',
20 help: 'Mode in which to run the tests', 20 help: 'Mode in which to run the tests',
21 allowed: ['all', 'debug', 'release']); 21 allowed: ['all', 'debug', 'release']);
22 22
23 parser.addOption('compiler', abbr: 'c', defaultsTo: 'none', 23 parser.addOption('compiler', abbr: 'c', defaultsTo: 'none',
24 help: 'Specify any compilation step (if needed).', 24 help: 'Specify any compilation step (if needed).',
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 parser.addOption('dart', help: 'Path to dart executable'); 118 parser.addOption('dart', help: 'Path to dart executable');
119 parser.addOption('drt', help: 'Path to DumpRenderTree executable'); 119 parser.addOption('drt', help: 'Path to DumpRenderTree executable');
120 parser.addOption('dartium', help: 'Path to Dartium Chrome executable'); 120 parser.addOption('dartium', help: 'Path to Dartium Chrome executable');
121 121
122 parser.addFlag('batch', abbr: 'b', 122 parser.addFlag('batch', abbr: 'b',
123 help: 'Run browser tests in batch mode', 123 help: 'Run browser tests in batch mode',
124 defaultsTo: true); 124 defaultsTo: true);
125 125
126 print(parser.getUsage()); 126 print(parser.getUsage());
127 } 127 }
OLDNEW
« no previous file with comments | « no previous file | pkg/args/lib/args.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698