| 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('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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 429 |
| 430 main() { | 430 main() { |
| 431 topgetset; | 431 topgetset; |
| 432 topgetset = 6; | 432 topgetset = 6; |
| 433 | 433 |
| 434 mylib.topgetset; | 434 mylib.topgetset; |
| 435 mylib.topgetset = 5; | 435 mylib.topgetset = 5; |
| 436 } | 436 } |
| 437 '''; | 437 '''; |
| 438 var expectedResult = | 438 var expectedResult = |
| 439 'get p_topgetset=> 5;' | 439 'get topgetset=> 5;' |
| 440 'set topgetset(arg){}' |
| 441 'get p_topgetset=> 6;' |
| 440 'set p_topgetset(arg){}' | 442 'set p_topgetset(arg){}' |
| 441 'get topgetset=> 6;' | 443 'main(){p_topgetset; p_topgetset=6; topgetset; topgetset=5;}'; |
| 442 'set topgetset(arg){}' | |
| 443 'main(){topgetset; topgetset=6; p_topgetset; p_topgetset=5;}'; | |
| 444 testDart2DartWithLibrary(mainSrc, librarySrc, | 444 testDart2DartWithLibrary(mainSrc, librarySrc, |
| 445 (String result) { Expect.equals(expectedResult, result); }); | 445 (String result) { Expect.equals(expectedResult, result); }); |
| 446 } | 446 } |
| 447 | 447 |
| 448 testFieldTypeOutput() { | 448 testFieldTypeOutput() { |
| 449 testDart2Dart('main(){new A().field;}class B{}class A{B field;}'); | 449 testDart2Dart('main(){new A().field;}class B{}class A{B field;}'); |
| 450 } | 450 } |
| 451 | 451 |
| 452 testDefaultClassNamePlaceholder() { | 452 testDefaultClassNamePlaceholder() { |
| 453 var src = ''' | 453 var src = ''' |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |