| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 testLibraryGetSet() { | 414 testLibraryGetSet() { |
| 415 var librarySrc = ''' | 415 var librarySrc = ''' |
| 416 #library('mylib'); | 416 #library('mylib'); |
| 417 | 417 |
| 418 get topgetset() => 5; | 418 get topgetset() => 5; |
| 419 set topgetset(arg) {} | 419 set topgetset(arg) {} |
| 420 '''; | 420 '''; |
| 421 var mainSrc = ''' | 421 var mainSrc = ''' |
| 422 #import('mylib.dart', prefix: 'mylib'); | 422 #import('mylib.dart', prefix: 'mylib'); |
| 423 | 423 |
| 424 get topgetset() => 6; |
| 425 set topgetset(arg) {} |
| 426 |
| 424 main() { | 427 main() { |
| 428 topgetset; |
| 429 topgetset = 6; |
| 430 |
| 425 mylib.topgetset; | 431 mylib.topgetset; |
| 426 mylib.topgetset = 5; | 432 mylib.topgetset = 5; |
| 427 } | 433 } |
| 428 '''; | 434 '''; |
| 429 var expectedResult = | 435 var expectedResult = |
| 430 'get topgetset()=> 5;' | 436 'get p_topgetset()=> 5;' |
| 437 'set p_topgetset(arg){}' |
| 438 'get topgetset()=> 6;' |
| 431 'set topgetset(arg){}' | 439 'set topgetset(arg){}' |
| 432 'main(){topgetset; topgetset=5;}'; | 440 'main(){topgetset; topgetset=6; p_topgetset; p_topgetset=5;}'; |
| 433 testDart2DartWithLibrary(mainSrc, librarySrc, | 441 testDart2DartWithLibrary(mainSrc, librarySrc, |
| 434 (String result) { Expect.equals(expectedResult, result); }); | 442 (String result) { Expect.equals(expectedResult, result); }); |
| 435 } | 443 } |
| 436 | 444 |
| 437 testFieldTypeOutput() { | 445 testFieldTypeOutput() { |
| 438 testDart2Dart('main(){new A().field;}class B{}class A{B field;}'); | 446 testDart2Dart('main(){new A().field;}class B{}class A{B field;}'); |
| 439 } | 447 } |
| 440 | 448 |
| 441 main() { | 449 main() { |
| 442 testSignedConstants(); | 450 testSignedConstants(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 461 testAbstractClass(); | 469 testAbstractClass(); |
| 462 //testConflictSendsRename(); | 470 //testConflictSendsRename(); |
| 463 testNoConflictSendsRename(); | 471 testNoConflictSendsRename(); |
| 464 testConflictLibraryClassRename(); | 472 testConflictLibraryClassRename(); |
| 465 testDefaultClassWithArgs(); | 473 testDefaultClassWithArgs(); |
| 466 testClassExtendsWithArgs(); | 474 testClassExtendsWithArgs(); |
| 467 testStaticInvocation(); | 475 testStaticInvocation(); |
| 468 testLibraryGetSet(); | 476 testLibraryGetSet(); |
| 469 testFieldTypeOutput(); | 477 testFieldTypeOutput(); |
| 470 } | 478 } |
| OLD | NEW |