mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:39:48 +00:00
Remove uses of Options from tools directory. Fix platform_test.
BUG= R=sgjesse@google.com Review URL: https://codereview.chromium.org//51043004 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29562 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
8a86fc897f
commit
ad88bc6020
|
@ -48,10 +48,10 @@ testIsolate() {
|
|||
port.first.then((results) {
|
||||
Expect.equals(Platform.executable, results["Platform.executable"]);
|
||||
|
||||
Uri uri = Uri.file(results["Platform.script"]);
|
||||
Uri uri = new Uri.file(results["Platform.script"]);
|
||||
// SpawnFunction retains the script url of the parent which in this
|
||||
// case was a relative path.
|
||||
Expect.equals("", uri.scheme);
|
||||
Expect.equals("file", uri.scheme);
|
||||
Expect.isTrue(uri.path.endsWith('tests/standalone/io/platform_test.dart'));
|
||||
Expect.equals(Platform.packageRoot, results["Platform.packageRoot"]);
|
||||
Expect.listEquals(Platform.executableArguments,
|
||||
|
|
|
@ -523,10 +523,9 @@ class JsonBuffer {
|
|||
}
|
||||
|
||||
|
||||
void main() {
|
||||
var options = new Options();
|
||||
void main(List<String> arguments) {
|
||||
var targetOpts = [ "--debug:0" ];
|
||||
for (String str in options.arguments) {
|
||||
for (String str in arguments) {
|
||||
switch (str) {
|
||||
case "--verbose":
|
||||
showDebuggeeOutput = true;
|
||||
|
@ -540,7 +539,7 @@ void main() {
|
|||
}
|
||||
}
|
||||
|
||||
Process.start(options.executable, targetOpts).then((Process process) {
|
||||
Process.start(Platform.executable, targetOpts).then((Process process) {
|
||||
process.stdin.close();
|
||||
debugger = new Debugger(process);
|
||||
});
|
||||
|
|
|
@ -626,12 +626,10 @@ void debuggerMain() {
|
|||
});
|
||||
}
|
||||
|
||||
void main() {
|
||||
Options options = new Options();
|
||||
List<String> arguments = options.arguments;
|
||||
void main(List<String> arguments) {
|
||||
if (arguments.length > 0) {
|
||||
arguments = <String>['--debug', '--verbose_debug']..addAll(arguments);
|
||||
Process.start(options.executable, arguments).then((Process process) {
|
||||
Process.start(Platform.executable, arguments).then((Process process) {
|
||||
process.stdin.close();
|
||||
process.exitCode.then((int exitCode) {
|
||||
print('${arguments.join(" ")} exited with $exitCode');
|
||||
|
|
|
@ -34,4 +34,4 @@ main() {
|
|||
* Gets the full path to the directory containing the entrypoint of the current
|
||||
* script.
|
||||
*/
|
||||
String get scriptDir => path.dirname(new Options().script);
|
||||
String get scriptDir => path.dirname(Platform.script);
|
||||
|
|
|
@ -300,8 +300,8 @@ class Message {
|
|||
|
||||
final env = new Environment();
|
||||
|
||||
main() {
|
||||
parseArgs();
|
||||
main(List<String> arguments) {
|
||||
parseArgs(arguments);
|
||||
|
||||
List files = filesToProcess(env.input);
|
||||
int filesPerWorker = files.length ~/ env.workers;
|
||||
|
@ -399,7 +399,7 @@ main() {
|
|||
|
||||
/// Checks the validity of the provided arguments. Does not initialize actual
|
||||
/// processing.
|
||||
parseArgs() {
|
||||
parseArgs(List<String> arguments) {
|
||||
var parser = new ArgParser();
|
||||
|
||||
parser.addOption("sdk-root", abbr: "s",
|
||||
|
@ -427,7 +427,7 @@ parseArgs() {
|
|||
help: "show this help",
|
||||
negatable: false);
|
||||
|
||||
var args = parser.parse(new Options().arguments);
|
||||
var args = parser.parse(arguments);
|
||||
|
||||
printUsage() {
|
||||
print("Usage: dart full-coverage.dart [OPTION...]\n");
|
||||
|
|
|
@ -11,8 +11,7 @@ final startBlock = new RegExp(r'^(\s*)/\*\*(.*)$');
|
|||
final blockLine = new RegExp(r'^\s*\*\s?(.*)$');
|
||||
final endBlock = new RegExp(r'^\s*\*/\s*$');
|
||||
|
||||
main() {
|
||||
var args = new Options().arguments;
|
||||
main(List<String> args) {
|
||||
if (args.length != 1) {
|
||||
print('Converts "/**"-style block doc comments in a directory ');
|
||||
print('containing Dart code to "///"-style line doc comments.');
|
||||
|
|
Loading…
Reference in a new issue