| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 #import("dart:uri"); |
| 6 |
| 7 #import('compiler_helper.dart'); |
| 8 |
| 9 #import('../../../lib/compiler/implementation/elements/elements.dart'); |
| 10 #import('../../../lib/compiler/implementation/leg.dart'); |
| 11 |
| 12 void testClassMetadata() { |
| 13 // TODO(ahe): native should be "const", not "final". |
| 14 final source = """final native = 'xyz'; |
| 15 @native class Foo {} |
| 16 main() {}"""; |
| 17 |
| 18 check(compiler, element) { |
| 19 return; // TODO(ahe): I'm working on the following. |
| 20 Expect.isFalse(element.metadata.isEmpty()); |
| 21 MetadataAnnotation annotation = element.metadata.head; |
| 22 Expect.isNotNull(annotation); |
| 23 Constant value = annotation.value; |
| 24 print(value); |
| 25 } |
| 26 |
| 27 compileAndCheck(source, 'Foo', check); |
| 28 } |
| 29 |
| 30 void main() { |
| 31 testClassMetadata(); |
| 32 } |
| OLD | NEW |