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

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

Issue 12086062: Rename mappedBy to map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undo change to test-script. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tests/corelib/iterable_join_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar t'; 5 import '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar t';
6 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart'; 6 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart';
7 import '../../../sdk/lib/_internal/compiler/implementation/util/util.dart'; 7 import '../../../sdk/lib/_internal/compiler/implementation/util/util.dart';
8 import 'mock_compiler.dart'; 8 import 'mock_compiler.dart';
9 import 'parser_helper.dart'; 9 import 'parser_helper.dart';
10 10
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 // (in2,{nm2} -> out2). 431 // (in2,{nm2} -> out2).
432 expect(bool value, List<DartType> in1, Map<String,DartType> nm1, 432 expect(bool value, List<DartType> in1, Map<String,DartType> nm1,
433 List<DartType> in2, Map<String,DartType> nm2) { 433 List<DartType> in2, Map<String,DartType> nm2) {
434 434
435 SourceString convertString(String string) => new SourceString(string); 435 SourceString convertString(String string) => new SourceString(string);
436 int compareString(a, b) => a.compareTo(b); 436 int compareString(a, b) => a.compareTo(b);
437 437
438 Link<SourceString> createNames(Map<String,DartType> nm) { 438 Link<SourceString> createNames(Map<String,DartType> nm) {
439 List<String> nmSorted = new List<String>.from(nm.keys)..sort(); 439 List<String> nmSorted = new List<String>.from(nm.keys)..sort();
440 List<SourceString> nmSourceStrings = 440 List<SourceString> nmSourceStrings =
441 nmSorted.mappedBy((string) => new SourceString(string)); 441 nmSorted.map((string) => new SourceString(string));
442 return new Link<SourceString>.fromList(nmSourceStrings); 442 return new Link<SourceString>.fromList(nmSourceStrings);
443 } 443 }
444 444
445 Link<DartType> createTypes(Map<String,DartType> nm, 445 Link<DartType> createTypes(Map<String,DartType> nm,
446 Link<SourceString> names) { 446 Link<SourceString> names) {
447 var types = new LinkBuilder<DartType>(); 447 var types = new LinkBuilder<DartType>();
448 for (SourceString name in names) { 448 for (SourceString name in names) {
449 types.addLast(nm[name.slowToString()]); 449 types.addLast(nm[name.slowToString()]);
450 } 450 }
451 return types.toLink(); 451 return types.toLink();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 Node node = listener.popNode(); 601 Node node = listener.popNode();
602 classElement.ensureResolved(compiler); 602 classElement.ensureResolved(compiler);
603 TreeElements elements = compiler.resolveNodeStatement(node, classElement); 603 TreeElements elements = compiler.resolveNodeStatement(node, classElement);
604 TypeCheckerVisitor checker = new TypeCheckerVisitor(compiler, elements, 604 TypeCheckerVisitor checker = new TypeCheckerVisitor(compiler, elements,
605 types); 605 types);
606 compiler.clearWarnings(); 606 compiler.clearWarnings();
607 checker.currentClass = classElement; 607 checker.currentClass = classElement;
608 checker.analyze(node); 608 checker.analyze(node);
609 compareWarningKinds(text, expectedWarnings, compiler.warnings); 609 compareWarningKinds(text, expectedWarnings, compiler.warnings);
610 } 610 }
OLDNEW
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tests/corelib/iterable_join_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698