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

Side by Side Diff: pkg/analyzer2dart/test/end2end_test.dart

Issue 562123002: Support parameter access in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
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 /// End-to-end test of the analyzer2dart compiler. 5 /// End-to-end test of the analyzer2dart compiler.
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'mock_sdk.dart'; 9 import 'mock_sdk.dart';
10 import 'package:analyzer/file_system/memory_file_system.dart'; 10 import 'package:analyzer/file_system/memory_file_system.dart';
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 foo(a) $NEW_BACKEND_COMMENT 231 foo(a) $NEW_BACKEND_COMMENT
232 {} 232 {}
233 233
234 main() $NEW_BACKEND_COMMENT 234 main() $NEW_BACKEND_COMMENT
235 { 235 {
236 foo(null); 236 foo(null);
237 bar(0, ""); 237 bar(0, "");
238 } 238 }
239 239
240 '''); 240 ''');
241
242 checkResult('''
243 bar(b) {}
244 foo(a) {
245 bar(a);
246 }
247 main() {
248 foo(null);
249 }
250 ''', '''
251 bar(b) $NEW_BACKEND_COMMENT
252 {}
253
254 foo(a) $NEW_BACKEND_COMMENT
255 {
256 bar(a);
257 }
258
259 main() $NEW_BACKEND_COMMENT
260 {
261 foo(null);
262 }
263
264 ''');
241 }); 265 });
242 } 266 }
243 267
244 checkResult(String input, String expectedOutput) { 268 checkResult(String input, String expectedOutput) {
245 CollectingOutputProvider outputProvider = new CollectingOutputProvider(); 269 CollectingOutputProvider outputProvider = new CollectingOutputProvider();
246 MemoryResourceProvider provider = new MemoryResourceProvider(); 270 MemoryResourceProvider provider = new MemoryResourceProvider();
247 DartSdk sdk = new MockSdk(); 271 DartSdk sdk = new MockSdk();
248 Driver driver = new Driver(provider, sdk, outputProvider); 272 Driver driver = new Driver(provider, sdk, outputProvider);
249 String rootFile = '/root.dart'; 273 String rootFile = '/root.dart';
250 provider.newFile(rootFile, input); 274 provider.newFile(rootFile, input);
(...skipping 21 matching lines...) Expand all
272 sb.write(text); 296 sb.write(text);
273 } 297 }
274 298
275 void addError(errorEvent, [StackTrace stackTrace]) {} 299 void addError(errorEvent, [StackTrace stackTrace]) {}
276 300
277 void close() {} 301 void close() {}
278 302
279 String get text => sb.toString(); 303 String get text => sb.toString();
280 } 304 }
281 305
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698