| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 testClassWithSynthesizedConstructor() { | 137 testClassWithSynthesizedConstructor() { |
| 138 testDart2Dart('main(){new A();}class A{}'); | 138 testDart2Dart('main(){new A();}class A{}'); |
| 139 } | 139 } |
| 140 | 140 |
| 141 testClassWithMethod() { | 141 testClassWithMethod() { |
| 142 testDart2Dart('main(){var a=new A(); a.foo();}class A{void foo(){}}'); | 142 testDart2Dart('main(){var a=new A(); a.foo();}class A{void foo(){}}'); |
| 143 } | 143 } |
| 144 | 144 |
| 145 testVariableDefinitions() { |
| 146 testDart2Dart('main(){final var x, y; final String s;}'); |
| 147 testDart2Dart('foo(f, g){}main(){foo(1, 2);}'); |
| 148 testDart2Dart('foo(f(arg)){}main(){foo(main);}'); |
| 149 } |
| 150 |
| 145 main() { | 151 main() { |
| 146 testGenericTypes(); | 152 testGenericTypes(); |
| 147 testForLoop(); | 153 testForLoop(); |
| 148 testEmptyList(); | 154 testEmptyList(); |
| 149 testClosure(); | 155 testClosure(); |
| 150 testIndexedOperatorDecl(); | 156 testIndexedOperatorDecl(); |
| 151 testNativeMethods(); | 157 testNativeMethods(); |
| 152 testPrefixIncrements(); | 158 testPrefixIncrements(); |
| 153 testConstModifier(); | 159 testConstModifier(); |
| 154 testSimpleFileUnparse(); | 160 testSimpleFileUnparse(); |
| 155 testSimpleObjectInstantiation(); | 161 testSimpleObjectInstantiation(); |
| 156 testSimpleTopLevelClass(); | 162 testSimpleTopLevelClass(); |
| 157 testClassWithSynthesizedConstructor(); | 163 testClassWithSynthesizedConstructor(); |
| 158 testClassWithMethod(); | 164 testClassWithMethod(); |
| 165 testVariableDefinitions(); |
| 159 testTopLevelField(); | 166 testTopLevelField(); |
| 160 } | 167 } |
| OLD | NEW |