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

Side by Side Diff: pkg/analyzer/test/source/sdk_ext_test.dart

Issue 2975253002: Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt. (Closed)
Patch Set: Created 3 years, 5 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.source.sdk_ext_test; 5 library analyzer.test.source.sdk_ext_test;
6 6
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/source/sdk_ext.dart'; 9 import 'package:analyzer/source/sdk_ext.dart';
10 import 'package:test/test.dart'; 10 import 'package:test/test.dart';
(...skipping 12 matching lines...) Expand all
23 void setUp() { 23 void setUp() {
24 String joinAndEscape(List<String> components) { 24 String joinAndEscape(List<String> components) {
25 return resourceProvider.pathContext 25 return resourceProvider.pathContext
26 .joinAll(components) 26 .joinAll(components)
27 .replaceAll(r'\', r'\\'); 27 .replaceAll(r'\', r'\\');
28 } 28 }
29 29
30 resourceProvider = new MemoryResourceProvider(); 30 resourceProvider = new MemoryResourceProvider();
31 resourceProvider.newFolder(resourceProvider.convertPath('/empty')); 31 resourceProvider.newFolder(resourceProvider.convertPath('/empty'));
32 resourceProvider.newFolder(resourceProvider.convertPath('/tmp')); 32 resourceProvider.newFolder(resourceProvider.convertPath('/tmp'));
33 resourceProvider.newFile( 33 resourceProvider.newFile(resourceProvider.convertPath('/tmp/_sdkext'), '''
34 resourceProvider.convertPath('/tmp/_sdkext'),
35 '''
36 { 34 {
37 "dart:fox": "slippy.dart", 35 "dart:fox": "slippy.dart",
38 "dart:bear": "grizzly.dart", 36 "dart:bear": "grizzly.dart",
39 "dart:relative": "${joinAndEscape(['..', 'relative.dart'])}", 37 "dart:relative": "${joinAndEscape(['..', 'relative.dart'])}",
40 "dart:deep": "${joinAndEscape(['deep', 'directory', 'file.dart'])}", 38 "dart:deep": "${joinAndEscape(['deep', 'directory', 'file.dart'])}",
41 "fart:loudly": "nomatter.dart" 39 "fart:loudly": "nomatter.dart"
42 }'''); 40 }''');
43 } 41 }
44 42
45 test_create_badJSON() { 43 test_create_badJSON() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 expect(source, isNotNull); 89 expect(source, isNotNull);
92 // Restore source's uri. 90 // Restore source's uri.
93 var restoreUri = resolver.restoreAbsolute(source); 91 var restoreUri = resolver.restoreAbsolute(source);
94 expect(restoreUri, isNotNull); 92 expect(restoreUri, isNotNull);
95 // Verify that it is 'dart:fox'. 93 // Verify that it is 'dart:fox'.
96 expect(restoreUri.toString(), equals('dart:fox')); 94 expect(restoreUri.toString(), equals('dart:fox'));
97 expect(restoreUri.scheme, equals('dart')); 95 expect(restoreUri.scheme, equals('dart'));
98 expect(restoreUri.path, equals('fox')); 96 expect(restoreUri.path, equals('fox'));
99 } 97 }
100 } 98 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/source/analysis_options_provider_test.dart ('k') | pkg/analyzer/test/src/command_line/arguments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698