| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 main() { | 105 main() { |
| 106 should_be_kept(); | 106 should_be_kept(); |
| 107 } | 107 } |
| 108 '''; | 108 '''; |
| 109 testDart2Dart(src, (String s) { | 109 testDart2Dart(src, (String s) { |
| 110 Expect.equals('should_be_kept(){}main(){should_be_kept();}', s); | 110 Expect.equals('should_be_kept(){}main(){should_be_kept();}', s); |
| 111 }); | 111 }); |
| 112 } | 112 } |
| 113 | 113 |
| 114 testTopLevelField() { |
| 115 final src = 'final String x="asd";main(){x;}'; |
| 116 testDart2Dart(src, (String s) => Expect.equals(src, s)); |
| 117 } |
| 118 |
| 114 main() { | 119 main() { |
| 115 testGenericTypes(); | 120 testGenericTypes(); |
| 116 testForLoop(); | 121 testForLoop(); |
| 117 testEmptyList(); | 122 testEmptyList(); |
| 118 testClosure(); | 123 testClosure(); |
| 119 testIndexedOperatorDecl(); | 124 testIndexedOperatorDecl(); |
| 120 testNativeMethods(); | 125 testNativeMethods(); |
| 121 testPrefixIncrements(); | 126 testPrefixIncrements(); |
| 122 testSimpleFileUnparse(); | 127 testSimpleFileUnparse(); |
| 128 testTopLevelField(); |
| 123 } | 129 } |
| OLD | NEW |