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

Side by Side Diff: test/io.dart

Issue 939303003: pkg/unittest: Fix warnings reported by analyzer (Closed) Base URL: https://github.com/dart-lang/unittest.git@master
Patch Set: nits Created 5 years, 10 months 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
« pubspec.yaml ('K') | « pubspec.yaml ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 unittest.test.io; 5 library unittest.test.io;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:mirrors'; 8 import 'dart:mirrors';
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
11 import 'package:stack_trace/stack_trace.dart';
12 11
13 /// The root directory of the `unittest` package. 12 /// The root directory of the `unittest` package.
14 final String packageDir = _computePackageDir(); 13 final String packageDir = _computePackageDir();
15 String _computePackageDir() => 14 String _computePackageDir() =>
16 p.dirname(p.dirname(_libraryPath(#unittest.test.io))); 15 p.dirname(p.dirname(_libraryPath(#unittest.test.io)));
17 16
18 /// Runs the unittest executable with the package root set properly. 17 /// Runs the unittest executable with the package root set properly.
19 ProcessResult runUnittest(List<String> args, {String workingDirectory, 18 ProcessResult runUnittest(List<String> args, {String workingDirectory,
20 Map<String, String> environment}) { 19 Map<String, String> environment}) {
21 var allArgs = [ 20 var allArgs = [
(...skipping 22 matching lines...) Expand all
44 /// Returns the path to the library named [libraryName]. 43 /// Returns the path to the library named [libraryName].
45 /// 44 ///
46 /// The library name must be globally unique, or the wrong library path may be 45 /// The library name must be globally unique, or the wrong library path may be
47 /// returned. 46 /// returned.
48 String _libraryPath(Symbol libraryName) { 47 String _libraryPath(Symbol libraryName) {
49 var lib = currentMirrorSystem().findLibrary(libraryName); 48 var lib = currentMirrorSystem().findLibrary(libraryName);
50 return p.fromUri(lib.uri); 49 return p.fromUri(lib.uri);
51 } 50 }
52 51
53 52
OLDNEW
« pubspec.yaml ('K') | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698