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

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

Issue 10834416: Rename elements after sorting. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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('mock_compiler.dart'); 7 #import('mock_compiler.dart');
8 #import("../../../lib/compiler/compiler.dart"); 8 #import("../../../lib/compiler/compiler.dart");
9 #import("../../../lib/compiler/implementation/dart_backend/dart_backend.dart"); 9 #import("../../../lib/compiler/implementation/dart_backend/dart_backend.dart");
10 #import("../../../lib/compiler/implementation/elements/elements.dart"); 10 #import("../../../lib/compiler/implementation/elements/elements.dart");
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 b.foo(); 382 b.foo();
383 var GREATVAR = b.myliba; 383 var GREATVAR = b.myliba;
384 b.mylist; 384 b.mylist;
385 a = getA(); 385 a = getA();
386 topfoo(); 386 topfoo();
387 mylib.topfoo(); 387 mylib.topfoo();
388 } 388 }
389 '''; 389 ''';
390 var expectedResult = 390 var expectedResult =
391 'topfoo(){}' 391 'topfoo(){}'
392 'class p_A{foo(){}}' 392 'class A{foo(){}}'
393 'p_topfoo(){var x=5;}' 393 'p_topfoo(){var x=5;}'
394 'class A{num foo(){}A.fromFoo(){}p_A myliba;List<A> mylist;}' 394 'class p_A{num foo(){}p_A.fromFoo(){}A myliba;List<p_A> mylist;}'
395 'p_A getA()=> null;' 395 'A getA()=> null;'
396 'main(){var a=new p_A(); a.foo(); var b=new A.fromFoo(); b.foo(); var GREATV AR=b.myliba; b.mylist; a=getA(); p_topfoo(); topfoo();}'; 396 'main(){var a=new A(); a.foo(); var b=new p_A.fromFoo(); b.foo(); var GREATV AR=b.myliba; b.mylist; a=getA(); p_topfoo(); topfoo();}';
397 testDart2DartWithLibrary(mainSrc, librarySrc, 397 testDart2DartWithLibrary(mainSrc, librarySrc,
398 (String result) { Expect.equals(expectedResult, result); }); 398 (String result) { Expect.equals(expectedResult, result); });
399 } 399 }
400 400
401 testDefaultClassWithArgs() { 401 testDefaultClassWithArgs() {
402 testDart2Dart('main(){var result=new IA<String>();}' 402 testDart2Dart('main(){var result=new IA<String>();}'
403 'interface IA<T> default A<T extends Object>{IA();}' 403 'interface IA<T> default A<T extends Object>{IA();}'
404 'class A<T extends Object> implements IA<T>{factory A(){}}'); 404 'class A<T extends Object> implements IA<T>{factory A(){}}');
405 } 405 }
406 406
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 //testConflictSendsRename(); 501 //testConflictSendsRename();
502 testNoConflictSendsRename(); 502 testNoConflictSendsRename();
503 testConflictLibraryClassRename(); 503 testConflictLibraryClassRename();
504 testDefaultClassWithArgs(); 504 testDefaultClassWithArgs();
505 testClassExtendsWithArgs(); 505 testClassExtendsWithArgs();
506 testStaticInvocation(); 506 testStaticInvocation();
507 testLibraryGetSet(); 507 testLibraryGetSet();
508 testFieldTypeOutput(); 508 testFieldTypeOutput();
509 testDefaultClassNamePlaceholder(); 509 testDefaultClassNamePlaceholder();
510 } 510 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698