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

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

Issue 10850015: Changed default Uri constructor to Uri.fromComponents(), new default constructor is Uri.fromString(… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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('dart:uri'); 5 #import('dart:uri');
6 #import('parser_helper.dart'); 6 #import('parser_helper.dart');
7 #import("../../../lib/compiler/compiler.dart"); 7 #import("../../../lib/compiler/compiler.dart");
8 #import("../../../lib/compiler/implementation/tree/tree.dart"); 8 #import("../../../lib/compiler/implementation/tree/tree.dart");
9 9
10 testUnparse(String statement) { 10 testUnparse(String statement) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 continuation = (s) { Expect.equals(src, s); }; 42 continuation = (s) { Expect.equals(src, s); };
43 } 43 }
44 testDart2DartWithLibrary(src, '', continuation); 44 testDart2DartWithLibrary(src, '', continuation);
45 } 45 }
46 46
47 /** 47 /**
48 * Library name is assumed to be 'mylib' in 'mylib.dart' file. 48 * Library name is assumed to be 'mylib' in 'mylib.dart' file.
49 */ 49 */
50 testDart2DartWithLibrary( 50 testDart2DartWithLibrary(
51 String srcMain, String srcLibrary, [void continuation(String s)]) { 51 String srcMain, String srcLibrary, [void continuation(String s)]) {
52 fileUri(path) => new Uri(scheme: 'file', path: path); 52 fileUri(path) => new Uri.fromComponents(scheme: 'file', path: path);
53 53
54 final scriptUri = fileUri('script.dart'); 54 final scriptUri = fileUri('script.dart');
55 final libUri = fileUri('mylib.dart'); 55 final libUri = fileUri('mylib.dart');
56 56
57 provider(uri) { 57 provider(uri) {
58 if (uri == scriptUri) return new Future.immediate(srcMain); 58 if (uri == scriptUri) return new Future.immediate(srcMain);
59 if (uri.toString() == libUri.toString()) { 59 if (uri.toString() == libUri.toString()) {
60 return new Future.immediate(srcLibrary); 60 return new Future.immediate(srcLibrary);
61 } 61 }
62 if (uri.path.endsWith('/core.dart')) return new Future.immediate(coreLib); 62 if (uri.path.endsWith('/core.dart')) return new Future.immediate(coreLib);
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 testGetSet(); 425 testGetSet();
426 testFactoryConstructor(); 426 testFactoryConstructor();
427 testTopLevelField(); 427 testTopLevelField();
428 testAbstractClass(); 428 testAbstractClass();
429 testConflictLibraryClassRename(); 429 testConflictLibraryClassRename();
430 testNoConflictSendsRename(); 430 testNoConflictSendsRename();
431 testConflictSendsRename(); 431 testConflictSendsRename();
432 testDefaultClassWithArgs(); 432 testDefaultClassWithArgs();
433 testClassExtendsWithArgs(); 433 testClassExtendsWithArgs();
434 } 434 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/source_mapping_test.dart ('k') | dart/tests/utils/dummy_compiler_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698