| 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('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/leg.dart", prefix:'leg'); | 9 #import("../../../lib/compiler/implementation/leg.dart", prefix:'leg'); |
| 10 #import("../../../lib/compiler/implementation/dart_backend/dart_backend.dart"); | 10 #import("../../../lib/compiler/implementation/dart_backend/dart_backend.dart"); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 | 81 |
| 82 handler(uri, begin, end, message, kind) { | 82 handler(uri, begin, end, message, kind) { |
| 83 if (kind === Diagnostic.ERROR || kind === Diagnostic.CRASH) { | 83 if (kind === Diagnostic.ERROR || kind === Diagnostic.CRASH) { |
| 84 Expect.fail('$uri: $begin-$end: $message [$kind]'); | 84 Expect.fail('$uri: $begin-$end: $message [$kind]'); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 final options = <String>['--output-type=dart']; | 88 final options = <String>['--output-type=dart']; |
| 89 if (minify) options.add('--minify'); | 89 if (minify) options.add('--minify'); |
| 90 if (cutDeclarationTypes) options.add('--cutDeclarationTypes'); | 90 if (cutDeclarationTypes) options.add('--cut-declaration-types'); |
| 91 | 91 |
| 92 compile( | 92 compile( |
| 93 scriptUri, | 93 scriptUri, |
| 94 fileUri('libraryRoot'), | 94 fileUri('libraryRoot'), |
| 95 fileUri('packageRoot'), | 95 fileUri('packageRoot'), |
| 96 provider, | 96 provider, |
| 97 handler, | 97 handler, |
| 98 options).then(continuation); | 98 options).then(continuation); |
| 99 } | 99 } |
| 100 | 100 |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 testDoubleMains(); | 842 testDoubleMains(); |
| 843 testInterfaceDefaultAnotherLib(); | 843 testInterfaceDefaultAnotherLib(); |
| 844 testStaticAccessIoLib(); | 844 testStaticAccessIoLib(); |
| 845 testLocalFunctionPlaceholder(); | 845 testLocalFunctionPlaceholder(); |
| 846 testMinification(); | 846 testMinification(); |
| 847 testClosureLocalsMinified(); | 847 testClosureLocalsMinified(); |
| 848 testParametersMinified(); | 848 testParametersMinified(); |
| 849 testTypeVariablesInDifferentLibraries(); | 849 testTypeVariablesInDifferentLibraries(); |
| 850 testDeclarationTypePlaceholders(); | 850 testDeclarationTypePlaceholders(); |
| 851 } | 851 } |
| OLD | NEW |