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

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

Issue 1842563003: Format everything in analyzer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
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 analyzer.test.resource_utils; 5 library analyzer.test.resource_utils;
6 6
7 import 'dart:core' hide Resource; 7 import 'dart:core' hide Resource;
8 8
9 import 'package:analyzer/file_system/file_system.dart'; 9 import 'package:analyzer/file_system/file_system.dart';
10 import 'package:analyzer/file_system/memory_file_system.dart'; 10 import 'package:analyzer/file_system/memory_file_system.dart';
11 import 'package:analyzer/src/util/absolute_path.dart'; 11 import 'package:analyzer/src/util/absolute_path.dart';
12 import 'package:path/path.dart' as path; 12 import 'package:path/path.dart' as path;
13 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
14 14
15
16 bool get isWindows => path.Style.platform == path.Style.windows; 15 bool get isWindows => path.Style.platform == path.Style.windows;
17 16
18 /** 17 /**
19 * Assert that the given path is posix and absolute. 18 * Assert that the given path is posix and absolute.
20 */ 19 */
21 void expectAbsolutePosixPath(String posixPath) { 20 void expectAbsolutePosixPath(String posixPath) {
22 expect(posixPath, startsWith('/'), 21 expect(posixPath, startsWith('/'),
23 reason: 'Expected absolute posix path, but found $posixPath'); 22 reason: 'Expected absolute posix path, but found $posixPath');
24 } 23 }
25 24
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 fail('Expected windows path, but found: $path'); 120 fail('Expected windows path, but found: $path');
122 } 121 }
123 } else { 122 } else {
124 if (path.contains('\\')) { 123 if (path.contains('\\')) {
125 fail('Expected posix path, but found: $path'); 124 fail('Expected posix path, but found: $path');
126 } 125 }
127 } 126 }
128 return path; 127 return path;
129 } 128 }
130 } 129 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/parse_compilation_unit_test.dart ('k') | pkg/analyzer/test/src/summary/name_filter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698