| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Tests that dart2js doesn't support metadata on local elements. | 5 // Tests that dart2js doesn't support metadata on local elements. |
| 6 // Remove this file when dart2js support such features. | 6 // Remove this file when dart2js support such features. |
| 7 library trydart.forget_element_assertion; | 7 library trydart.forget_element_assertion; |
| 8 | 8 |
| 9 import '../../compiler/dart2js/compiler_helper.dart' show | 9 import '../../compiler/dart2js/mock_compiler.dart' show |
| 10 compilerFor; | 10 compilerFor; |
| 11 | 11 |
| 12 import 'compiler_test_case.dart'; | 12 import 'compiler_test_case.dart'; |
| 13 | 13 |
| 14 class FailingTestCase extends CompilerTestCase { | 14 class FailingTestCase extends CompilerTestCase { |
| 15 FailingTestCase.intermediate(String source, int errorCount, Uri scriptUri) | 15 FailingTestCase.intermediate(String source, int errorCount, Uri scriptUri) |
| 16 : super.init( | 16 : super.init( |
| 17 source, scriptUri, | 17 source, scriptUri, |
| 18 compilerFor(source, scriptUri, expectedErrors: errorCount)); | 18 compilerFor(source, scriptUri, expectedErrors: errorCount)); |
| 19 | 19 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // a positive test in forget_element_test.dart. For example: | 55 // a positive test in forget_element_test.dart. For example: |
| 56 // | 56 // |
| 57 // new ForgetElementTestCase( | 57 // new ForgetElementTestCase( |
| 58 // 'main() { @Constant() var x; return x; } $CONSTANT_CLASS', | 58 // 'main() { @Constant() var x; return x; } $CONSTANT_CLASS', |
| 59 // metadataCount: 1), | 59 // metadataCount: 1), |
| 60 new FailingTestCase( | 60 new FailingTestCase( |
| 61 'main() { @Constant() var x; return x; } $CONSTANT_CLASS', | 61 'main() { @Constant() var x; return x; } $CONSTANT_CLASS', |
| 62 1), | 62 1), |
| 63 ]; | 63 ]; |
| 64 } | 64 } |
| OLD | NEW |