| OLD | NEW |
| 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 library record_and_replay; | 5 library record_and_replay; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:json' as json; | 8 import 'dart:json' as json; |
| 9 import 'dart:utf'; | 9 import 'dart:utf'; |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 * ] | 34 * ] |
| 35 */ | 35 */ |
| 36 | 36 |
| 37 | 37 |
| 38 class TestCaseRecorder { | 38 class TestCaseRecorder { |
| 39 Path _outputPath; | 39 Path _outputPath; |
| 40 List<Map> _recordedCommandInvocations = []; | 40 List<Map> _recordedCommandInvocations = []; |
| 41 var _cwd; | 41 var _cwd; |
| 42 | 42 |
| 43 TestCaseRecorder(this._outputPath) { | 43 TestCaseRecorder(this._outputPath) { |
| 44 _cwd = Directory.current.path; | 44 _cwd = new Directory.current().path; |
| 45 } | 45 } |
| 46 | 46 |
| 47 void nextTestCase(TestCase testCase) { | 47 void nextTestCase(TestCase testCase) { |
| 48 assert(testCase.commands.length == 1); | 48 assert(testCase.commands.length == 1); |
| 49 | 49 |
| 50 var command = testCase.commands[0]; | 50 var command = testCase.commands[0]; |
| 51 assert(command.environment == null); | 51 assert(command.environment == null); |
| 52 | 52 |
| 53 var arguments = []; | 53 var arguments = []; |
| 54 for (var rawArgument in command.arguments) { | 54 for (var rawArgument in command.arguments) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 duration, | 117 duration, |
| 118 false); | 118 false); |
| 119 return commandOutput; | 119 return commandOutput; |
| 120 } | 120 } |
| 121 | 121 |
| 122 String _indexKey(String configuration, String name) { | 122 String _indexKey(String configuration, String name) { |
| 123 return "${configuration}__$name"; | 123 return "${configuration}__$name"; |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 | 126 |
| OLD | NEW |