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

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

Issue 10870008: dart2dart Rename statics as globals. (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/renamer.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('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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 mylib.A.staticfoo(); 275 mylib.A.staticfoo();
276 new mylib.A(); 276 new mylib.A();
277 new mylib.A.fromFoo(); 277 new mylib.A.fromFoo();
278 new mylib.A().foo(); 278 new mylib.A().foo();
279 } 279 }
280 '''; 280 ''';
281 var expectedResult = 281 var expectedResult =
282 'globalfoo(){}var globalVar;var globalVarInitialized=6,globalVarInitialize d2=7;' 282 'globalfoo(){}var globalVar;var globalVarInitialized=6,globalVarInitialize d2=7;'
283 'class A{A(){}A.fromFoo(){}static staticfoo(){}foo(){}static final field=5 ;}' 283 'class A{A(){}A.fromFoo(){}static staticfoo(){}foo(){}static final field=5 ;}'
284 'p_globalfoo(){}var p_globalVar;var p_globalVarInitialized=6,p_globalVarIn itialized2=7;' 284 'p_globalfoo(){}var p_globalVar;var p_globalVarInitialized=6,p_globalVarIn itialized2=7;'
285 'class p_A{p_A(){}p_A.fromFoo(){}static staticfoo(){}foo(){}static final f ield=5;}' 285 'class p_A{p_A(){}p_A.fromFoo(){}static p_staticfoo(){}foo(){}static final p_field=5;}'
286 'main(){p_globalVar; p_globalVarInitialized; p_globalVarInitialized2; p_gl obalfoo();' 286 'main(){p_globalVar; p_globalVarInitialized; p_globalVarInitialized2; p_gl obalfoo();'
287 ' p_A.field; p_A.staticfoo();' 287 ' p_A.p_field; p_A.p_staticfoo();'
288 ' new p_A(); new p_A.fromFoo(); new p_A().foo();' 288 ' new p_A(); new p_A.fromFoo(); new p_A().foo();'
289 ' globalVar; globalVarInitialized; globalVarInitialized2; globalfoo();' 289 ' globalVar; globalVarInitialized; globalVarInitialized2; globalfoo();'
290 ' A.field; A.staticfoo();' 290 ' A.field; A.staticfoo();'
291 ' new A(); new A.fromFoo(); new A().foo();}'; 291 ' new A(); new A.fromFoo(); new A().foo();}';
292 testDart2DartWithLibrary(mainSrc, librarySrc, 292 testDart2DartWithLibrary(mainSrc, librarySrc,
293 (String result) { Expect.equals(expectedResult, result); }); 293 (String result) { Expect.equals(expectedResult, result); });
294 } 294 }
295 295
296 testNoConflictSendsRename() { 296 testNoConflictSendsRename() {
297 // Various Send-s to current library and external library. Nothing should be 297 // Various Send-s to current library and external library. Nothing should be
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 testClassExtendsWithArgs(); 632 testClassExtendsWithArgs();
633 testStaticInvocation(); 633 testStaticInvocation();
634 testLibraryGetSet(); 634 testLibraryGetSet();
635 testFieldTypeOutput(); 635 testFieldTypeOutput();
636 testDefaultClassNamePlaceholder(); 636 testDefaultClassNamePlaceholder();
637 testFactoryRename(); 637 testFactoryRename();
638 testTypeVariablesAreRenamed(); 638 testTypeVariablesAreRenamed();
639 testClassTypeArgumentBound(); 639 testClassTypeArgumentBound();
640 testDoubleMains(); 640 testDoubleMains();
641 } 641 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/renamer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698