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 "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
8 import 'parser_helper.dart'; | 8 import 'parser_helper.dart'; |
9 import 'mock_compiler.dart'; | 9 import 'mock_compiler.dart'; |
10 import '../../../sdk/lib/_internal/compiler/compiler.dart'; | 10 import '../../../sdk/lib/_internal/compiler/compiler.dart'; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 testClassWithMethod() { | 172 testClassWithMethod() { |
173 testDart2Dart('main(){var a=new A();a.foo();}class A{void foo(){}}'); | 173 testDart2Dart('main(){var a=new A();a.foo();}class A{void foo(){}}'); |
174 } | 174 } |
175 | 175 |
176 testExtendsImplements() { | 176 testExtendsImplements() { |
177 testDart2Dart('main(){new B<Object>();}' | 177 testDart2Dart('main(){new B<Object>();}' |
178 'class A<T>{}class B<T> extends A<T>{}'); | 178 'class A<T>{}class B<T> extends A<T>{}'); |
179 } | 179 } |
180 | 180 |
181 testVariableDefinitions() { | 181 testVariableDefinitions() { |
182 testDart2Dart('main(){final var x,y;final String s;}'); | 182 testDart2Dart('main(){var x,y;final String s;}'); |
| 183 testDart2Dart('main(){final int x,y;final String s;}'); |
183 testDart2Dart('foo(f,g){}main(){foo(1,2);}'); | 184 testDart2Dart('foo(f,g){}main(){foo(1,2);}'); |
184 testDart2Dart('foo(f(arg)){}main(){foo(main);}'); | 185 testDart2Dart('foo(f(arg)){}main(){foo(main);}'); |
185 // A couple of static/finals inside a class. | 186 // A couple of static/finals inside a class. |
186 testDart2Dart('main(){A.a;A.b;}class A{static const String a="5";' | 187 testDart2Dart('main(){A.a;A.b;}class A{static const String a="5";' |
187 'static const String b="4";}'); | 188 'static const String b="4";}'); |
188 // Class member of typedef-ed function type. | 189 // Class member of typedef-ed function type. |
189 // Maybe typedef should be included in the result too, but it | 190 // Maybe typedef should be included in the result too, but it |
190 // works fine without it. | 191 // works fine without it. |
191 testDart2Dart( | 192 testDart2Dart( |
192 'typedef void foofunc(arg);main(){new A((arg){});}' | 193 'typedef void foofunc(arg);main(){new A((arg){});}' |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 testStaticAccessIoLib(); | 729 testStaticAccessIoLib(); |
729 testLocalFunctionPlaceholder(); | 730 testLocalFunctionPlaceholder(); |
730 testMinification(); | 731 testMinification(); |
731 testClosureLocalsMinified(); | 732 testClosureLocalsMinified(); |
732 testParametersMinified(); | 733 testParametersMinified(); |
733 testDeclarationTypePlaceholders(); | 734 testDeclarationTypePlaceholders(); |
734 testPlatformLibraryMemberNamesAreFixed(); | 735 testPlatformLibraryMemberNamesAreFixed(); |
735 testConflictsWithCoreLib(); | 736 testConflictsWithCoreLib(); |
736 testUnresolvedNamedConstructor(); | 737 testUnresolvedNamedConstructor(); |
737 } | 738 } |
OLD | NEW |