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

Side by Side Diff: pkg/analyzer/test/utils.dart

Issue 45573002: Rename analyzer_experimental to analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks before publishing. Created 7 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 | « pkg/analyzer/test/services/test_utils.dart ('k') | pkg/analyzer_experimental/README.md » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 utils; 5 library utils;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer_experimental/analyzer.dart'; 9 import 'package:analyzer/analyzer.dart';
10 import 'package:path/path.dart' as pathos; 10 import 'package:path/path.dart' as pathos;
11 11
12 /// Returns the string representation of the [AnalyzerErrorGroup] thrown when 12 /// Returns the string representation of the [AnalyzerErrorGroup] thrown when
13 /// parsing [contents] as a Dart file. If [contents] doesn't throw any errors, 13 /// parsing [contents] as a Dart file. If [contents] doesn't throw any errors,
14 /// this will return null. 14 /// this will return null.
15 /// 15 ///
16 /// This replaces the filename in the error string with its basename, since the 16 /// This replaces the filename in the error string with its basename, since the
17 /// full path will vary from machine to machine. It also replaces the exception 17 /// full path will vary from machine to machine. It also replaces the exception
18 /// message with "..." to decouple these tests from the specific exception 18 /// message with "..." to decouple these tests from the specific exception
19 /// messages. 19 /// messages.
(...skipping 12 matching lines...) Expand all
32 return null; 32 return null;
33 }); 33 });
34 } 34 }
35 35
36 /// Creates a temporary directory and passes its path to [fn]. Once [fn] 36 /// Creates a temporary directory and passes its path to [fn]. Once [fn]
37 /// completes, the temporary directory and all its contents will be deleted. 37 /// completes, the temporary directory and all its contents will be deleted.
38 /// 38 ///
39 /// Returns the return value of [fn]. 39 /// Returns the return value of [fn].
40 dynamic withTempDir(fn(String path)) { 40 dynamic withTempDir(fn(String path)) {
41 var tempDir = 41 var tempDir =
42 Directory.systemTemp.createTempSync('analyzer_experimental_').path; 42 Directory.systemTemp.createTempSync('analyzer_').path;
43 try { 43 try {
44 return fn(tempDir); 44 return fn(tempDir);
45 } finally { 45 } finally {
46 new Directory(tempDir).deleteSync(recursive: true); 46 new Directory(tempDir).deleteSync(recursive: true);
47 } 47 }
48 } 48 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/services/test_utils.dart ('k') | pkg/analyzer_experimental/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698