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

Side by Side Diff: tests/compiler/dart2js/dart_backend_test.dart

Issue 22791002: Add renames in output when using the mirror helper library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added an assert. Created 7 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
« no previous file with comments | « sdk/lib/_internal/libraries.dart ('k') | tests/compiler/dart2js/mirror_helper_rename_test.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'dart:async'; 6 import 'dart:async';
7 import 'parser_helper.dart'; 7 import 'parser_helper.dart';
8 import 'mock_compiler.dart'; 8 import 'mock_compiler.dart';
9 import '../../../sdk/lib/_internal/compiler/compiler.dart'; 9 import '../../../sdk/lib/_internal/compiler/compiler.dart';
10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' as l eg; 10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' as l eg;
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 new PlaceholderCollector(compiler, new Set<String>(), new DynoMap(compiler)) 447 new PlaceholderCollector(compiler, new Set<String>(), new DynoMap(compiler))
448 ..collect(element); 448 ..collect(element);
449 449
450 testLocalFunctionPlaceholder() { 450 testLocalFunctionPlaceholder() {
451 var src = ''' 451 var src = '''
452 main() { 452 main() {
453 function localfoo() {} 453 function localfoo() {}
454 localfoo(); 454 localfoo();
455 } 455 }
456 '''; 456 ''';
457 MockCompiler compiler = new MockCompiler(); 457 MockCompiler compiler = new MockCompiler(emitJavaScript: false);
458 assert(compiler.backend is DartBackend);
458 compiler.parseScript(src); 459 compiler.parseScript(src);
459 FunctionElement mainElement = compiler.mainApp.find(leg.Compiler.MAIN); 460 FunctionElement mainElement = compiler.mainApp.find(leg.Compiler.MAIN);
460 compiler.processQueue(compiler.enqueuer.resolution, mainElement); 461 compiler.processQueue(compiler.enqueuer.resolution, mainElement);
461 PlaceholderCollector collector = collectPlaceholders(compiler, mainElement); 462 PlaceholderCollector collector = collectPlaceholders(compiler, mainElement);
462 FunctionExpression mainNode = mainElement.parseNode(compiler); 463 FunctionExpression mainNode = mainElement.parseNode(compiler);
463 FunctionExpression fooNode = mainNode.body.statements.nodes.head.function; 464 FunctionExpression fooNode = mainNode.body.statements.nodes.head.function;
464 LocalPlaceholder fooPlaceholder = 465 LocalPlaceholder fooPlaceholder =
465 collector.functionScopes[mainElement].localPlaceholders.first; 466 collector.functionScopes[mainElement].localPlaceholders.first;
466 Expect.isTrue(fooPlaceholder.nodes.contains(fooNode.name)); 467 Expect.isTrue(fooPlaceholder.nodes.contains(fooNode.name));
467 } 468 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 testStaticAccessIoLib(); 726 testStaticAccessIoLib();
726 testLocalFunctionPlaceholder(); 727 testLocalFunctionPlaceholder();
727 testMinification(); 728 testMinification();
728 testClosureLocalsMinified(); 729 testClosureLocalsMinified();
729 testParametersMinified(); 730 testParametersMinified();
730 testDeclarationTypePlaceholders(); 731 testDeclarationTypePlaceholders();
731 testPlatformLibraryMemberNamesAreFixed(); 732 testPlatformLibraryMemberNamesAreFixed();
732 testConflictsWithCoreLib(); 733 testConflictsWithCoreLib();
733 testUnresolvedNamedConstructor(); 734 testUnresolvedNamedConstructor();
734 } 735 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/libraries.dart ('k') | tests/compiler/dart2js/mirror_helper_rename_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698