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

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

Issue 16019002: Merge the dart:uri library into dart:core and update the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final cleanup Created 7 years, 6 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) 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:collection'; 6 import 'dart:collection';
7 7
8 import "../../../sdk/lib/_internal/compiler/implementation/resolution/resolution .dart"; 8 import "../../../sdk/lib/_internal/compiler/implementation/resolution/resolution .dart";
9 import "compiler_helper.dart"; 9 import "compiler_helper.dart";
10 import "parser_helper.dart"; 10 import "parser_helper.dart";
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 at(Link link, int index) => (index == 0) ? link.head : at(link.tail, index - 1); 777 at(Link link, int index) => (index == 0) ? link.head : at(link.tail, index - 1);
778 778
779 List<String> asSortedStrings(Link link) { 779 List<String> asSortedStrings(Link link) {
780 List<String> result = <String>[]; 780 List<String> result = <String>[];
781 for (; !link.isEmpty; link = link.tail) result.add(link.head.toString()); 781 for (; !link.isEmpty; link = link.tail) result.add(link.head.toString());
782 result.sort((s1, s2) => s1.compareTo(s2)); 782 result.sort((s1, s2) => s1.compareTo(s2));
783 return result; 783 return result;
784 } 784 }
785 785
786 compileScript(String source) { 786 compileScript(String source) {
787 Uri uri = new Uri.fromComponents(scheme: 'source'); 787 Uri uri = new Uri(scheme: 'source');
788 MockCompiler compiler = compilerFor(source, uri); 788 MockCompiler compiler = compilerFor(source, uri);
789 compiler.runCompiler(uri); 789 compiler.runCompiler(uri);
790 return compiler; 790 return compiler;
791 } 791 }
792 792
793 checkMemberResolved(compiler, className, memberName) { 793 checkMemberResolved(compiler, className, memberName) {
794 Element memberElement = findElement(compiler, className) 794 Element memberElement = findElement(compiler, className)
795 .lookupLocalMember(memberName); 795 .lookupLocalMember(memberName);
796 Expect.isNotNull(memberElement); 796 Expect.isNotNull(memberElement);
797 Expect.isNotNull( 797 Expect.isNotNull(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 var d = new D(); 838 var d = new D();
839 --d; 839 --d;
840 }"""; 840 }""";
841 final compiler = compileScript(script); 841 final compiler = compileScript(script);
842 842
843 checkMemberResolved(compiler, 'A', operatorName('+', false)); 843 checkMemberResolved(compiler, 'A', operatorName('+', false));
844 checkMemberResolved(compiler, 'B', operatorName('+', false)); 844 checkMemberResolved(compiler, 'B', operatorName('+', false));
845 checkMemberResolved(compiler, 'C', operatorName('-', false)); 845 checkMemberResolved(compiler, 'C', operatorName('-', false));
846 checkMemberResolved(compiler, 'D', operatorName('-', false)); 846 checkMemberResolved(compiler, 'D', operatorName('-', false));
847 } 847 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/resolution_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_and_or_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698