| OLD | NEW |
| 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 a.foo(); | 366 a.foo(); |
| 367 var b = new A.fromFoo(); | 367 var b = new A.fromFoo(); |
| 368 b.foo(); | 368 b.foo(); |
| 369 var GREATVAR = b.myliba; | 369 var GREATVAR = b.myliba; |
| 370 b.mylist; | 370 b.mylist; |
| 371 a = getA(); | 371 a = getA(); |
| 372 topfoo(); | 372 topfoo(); |
| 373 mylib.topfoo(); | 373 mylib.topfoo(); |
| 374 } | 374 } |
| 375 '''; | 375 '''; |
| 376 var expectedResult = @'topfoo(){}p_topfoo(){var x=5;}A getA()=> null;' | 376 var expectedResult = 'topfoo(){}p_topfoo(){var x=5;}p_A getA()=> null;main(){v
ar a=new p_A(); a.foo(); var b=new A.fromFoo(); b.foo(); var GREATVAR=b.myliba;
b.mylist; a=getA(); p_topfoo(); topfoo();}class A{A.fromFoo(){}List<A> mylist;nu
m foo(){}p_A myliba;}class p_A{foo(){}}'; |
| 377 @'main(){var a=new A(); a.foo(); var b=new p_A.fromFoo(); b.foo(); ' | |
| 378 @'var GREATVAR=b.myliba; b.mylist; a=getA(); p_topfoo(); topfoo();}' | |
| 379 @'class p_A{p_A.fromFoo(){}List<p_A> mylist;num foo(){}A myliba;}' | |
| 380 @'class A{foo(){}}'; | |
| 381 testDart2DartWithLibrary(mainSrc, librarySrc, | 377 testDart2DartWithLibrary(mainSrc, librarySrc, |
| 382 (String result) { Expect.equals(expectedResult, result); }); | 378 (String result) { Expect.equals(expectedResult, result); }); |
| 383 } | 379 } |
| 384 | 380 |
| 385 testDefaultClassWithArgs() { | 381 testDefaultClassWithArgs() { |
| 386 testDart2Dart('main(){var result=new IA<String>();}' | 382 testDart2Dart('main(){var result=new IA<String>();}' |
| 387 'interface IA<T> default A<T extends Object>{IA();}' | 383 'interface IA<T> default A<T extends Object>{IA();}' |
| 388 'class A<T extends Object> implements IA<T>{factory A(){}}'); | 384 'class A<T extends Object> implements IA<T>{factory A(){}}'); |
| 389 } | 385 } |
| 390 | 386 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 419 testGetSet(); | 415 testGetSet(); |
| 420 testFactoryConstructor(); | 416 testFactoryConstructor(); |
| 421 testAbstractClass(); | 417 testAbstractClass(); |
| 422 testConflictSendsRename(); | 418 testConflictSendsRename(); |
| 423 testNoConflictSendsRename(); | 419 testNoConflictSendsRename(); |
| 424 testConflictLibraryClassRename(); | 420 testConflictLibraryClassRename(); |
| 425 testDefaultClassWithArgs(); | 421 testDefaultClassWithArgs(); |
| 426 testClassExtendsWithArgs(); | 422 testClassExtendsWithArgs(); |
| 427 testStaticInvocation(); | 423 testStaticInvocation(); |
| 428 } | 424 } |
| OLD | NEW |