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

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

Issue 10834359: dart2dart Fix setter ref with library prefix. (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
« no previous file with comments | « lib/compiler/implementation/dart_backend/placeholder_collector.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 testClassExtendsWithArgs() { 389 testClassExtendsWithArgs() {
390 testDart2Dart('main(){new B<Object>();}' 390 testDart2Dart('main(){new B<Object>();}'
391 'class A<T extends Object>{}' 391 'class A<T extends Object>{}'
392 'class B<T extends Object> extends A<T>{}'); 392 'class B<T extends Object> extends A<T>{}');
393 } 393 }
394 394
395 testStaticInvocation() { 395 testStaticInvocation() {
396 testDart2Dart('main(){var x=Math.parseDouble("1");}'); 396 testDart2Dart('main(){var x=Math.parseDouble("1");}');
397 } 397 }
398 398
399 testLibraryGetSet() {
400 var librarySrc = '''
401 #library('mylib');
402
403 get topgetset() => 5;
404 set topgetset(arg) {}
405 ''';
406 var mainSrc = '''
407 #import('mylib.dart', prefix: 'mylib');
408
409 main() {
410 mylib.topgetset;
411 mylib.topgetset = 5;
412 }
413 ''';
414 var expectedResult = 'set topgetset(arg){}get topgetset()=> 5;main(){topgetset ; topgetset=5;}';
415 testDart2DartWithLibrary(mainSrc, librarySrc,
416 (String result) { Expect.equals(expectedResult, result); });
417 }
418
399 main() { 419 main() {
400 testSignedConstants(); 420 testSignedConstants();
401 testGenericTypes(); 421 testGenericTypes();
402 testForLoop(); 422 testForLoop();
403 testEmptyList(); 423 testEmptyList();
404 testClosure(); 424 testClosure();
405 testIndexedOperatorDecl(); 425 testIndexedOperatorDecl();
406 testNativeMethods(); 426 testNativeMethods();
407 testPrefixIncrements(); 427 testPrefixIncrements();
408 testConstModifier(); 428 testConstModifier();
409 testSimpleFileUnparse(); 429 testSimpleFileUnparse();
410 testTopLevelField(); 430 testTopLevelField();
411 testSimpleObjectInstantiation(); 431 testSimpleObjectInstantiation();
412 testSimpleTopLevelClass(); 432 testSimpleTopLevelClass();
413 testClassWithSynthesizedConstructor(); 433 testClassWithSynthesizedConstructor();
414 testClassWithMethod(); 434 testClassWithMethod();
415 testExtendsImplements(); 435 testExtendsImplements();
416 testVariableDefinitions(); 436 testVariableDefinitions();
417 testGetSet(); 437 testGetSet();
418 testFactoryConstructor(); 438 testFactoryConstructor();
419 testAbstractClass(); 439 testAbstractClass();
420 testConflictSendsRename(); 440 testConflictSendsRename();
421 testNoConflictSendsRename(); 441 testNoConflictSendsRename();
422 testConflictLibraryClassRename(); 442 testConflictLibraryClassRename();
423 testDefaultClassWithArgs(); 443 testDefaultClassWithArgs();
424 testClassExtendsWithArgs(); 444 testClassExtendsWithArgs();
425 testStaticInvocation(); 445 testStaticInvocation();
446 testLibraryGetSet();
426 } 447 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/placeholder_collector.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698