| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 test.integration.analysis; | 5 library test.integration.analysis; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:convert'; | 9 import 'dart:convert'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 * Parent directories are created as necessary. | 270 * Parent directories are created as necessary. |
| 271 * | 271 * |
| 272 * Return a normalized path to the file (with symbolic links resolved). | 272 * Return a normalized path to the file (with symbolic links resolved). |
| 273 */ | 273 */ |
| 274 String writeFile(String pathname, String contents) { | 274 String writeFile(String pathname, String contents) { |
| 275 new Directory(dirname(pathname)).createSync(recursive: true); | 275 new Directory(dirname(pathname)).createSync(recursive: true); |
| 276 File file = new File(pathname); | 276 File file = new File(pathname); |
| 277 file.writeAsStringSync(contents); | 277 file.writeAsStringSync(contents); |
| 278 return file.resolveSymbolicLinksSync(); | 278 return file.resolveSymbolicLinksSync(); |
| 279 } | 279 } |
| 280 |
| 281 /** |
| 282 * Read a source file with the given absolute [pathname]. |
| 283 */ |
| 284 String readFile(String pathname) => new File(pathname).readAsStringSync(); |
| 280 } | 285 } |
| 281 | 286 |
| 282 /** | 287 /** |
| 283 * An error result from a server request. | 288 * An error result from a server request. |
| 284 */ | 289 */ |
| 285 class ServerErrorMessage { | 290 class ServerErrorMessage { |
| 286 final Map message; | 291 final Map message; |
| 287 | 292 |
| 288 ServerErrorMessage(this.message); | 293 ServerErrorMessage(this.message); |
| 289 | 294 |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 void populateMismatches(item, List<MismatchDescriber> mismatches); | 982 void populateMismatches(item, List<MismatchDescriber> mismatches); |
| 978 | 983 |
| 979 /** | 984 /** |
| 980 * Create a [MismatchDescriber] describing a mismatch with a simple string. | 985 * Create a [MismatchDescriber] describing a mismatch with a simple string. |
| 981 */ | 986 */ |
| 982 MismatchDescriber simpleDescription(String description) => | 987 MismatchDescriber simpleDescription(String description) => |
| 983 (Description mismatchDescription) { | 988 (Description mismatchDescription) { |
| 984 mismatchDescription.add(description); | 989 mismatchDescription.add(description); |
| 985 }; | 990 }; |
| 986 } | 991 } |
| OLD | NEW |