| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library testing.dart_vm_suite; | 5 library testing.dart_vm_suite; |
| 6 | 6 |
| 7 import 'testing.dart'; | 7 import 'testing.dart'; |
| 8 | 8 |
| 9 Future<ChainContext> createContext( | 9 Future<ChainContext> createContext( |
| 10 Chain suite, Map<String, String> enviroment) async { | 10 Chain suite, Map<String, String> environment) async { |
| 11 return new VmContext(); | 11 return new VmContext(); |
| 12 } | 12 } |
| 13 | 13 |
| 14 class VmContext extends ChainContext { | 14 class VmContext extends ChainContext { |
| 15 final List<Step> steps = const <Step>[const DartVmStep()]; | 15 final List<Step> steps = const <Step>[const DartVmStep()]; |
| 16 } | 16 } |
| 17 | 17 |
| 18 class DartVmStep extends Step<TestDescription, int, VmContext> { | 18 class DartVmStep extends Step<TestDescription, int, VmContext> { |
| 19 const DartVmStep(); | 19 const DartVmStep(); |
| 20 | 20 |
| 21 String get name => "Dart VM"; | 21 String get name => "Dart VM"; |
| 22 | 22 |
| 23 Future<Result<int>> run(TestDescription input, VmContext context) async { | 23 Future<Result<int>> run(TestDescription input, VmContext context) async { |
| 24 StdioProcess process = await StdioProcess.run("dart", [input.file.path]); | 24 StdioProcess process = await StdioProcess.run("dart", [input.file.path]); |
| 25 return process.toResult(); | 25 return process.toResult(); |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 main(List<String> arguments) => runMe(arguments, createContext); | 29 main(List<String> arguments) => runMe(arguments, createContext); |
| OLD | NEW |