| Index: dart/tests/compiler/dart2js/metadata_test.dart
|
| diff --git a/dart/tests/compiler/dart2js/metadata_test.dart b/dart/tests/compiler/dart2js/metadata_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..195541bde8efb6b58e5ff100be43fde37bacfb18
|
| --- /dev/null
|
| +++ b/dart/tests/compiler/dart2js/metadata_test.dart
|
| @@ -0,0 +1,32 @@
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +#import("dart:uri");
|
| +
|
| +#import('compiler_helper.dart');
|
| +
|
| +#import('../../../lib/compiler/implementation/elements/elements.dart');
|
| +#import('../../../lib/compiler/implementation/leg.dart');
|
| +
|
| +void testClassMetadata() {
|
| + // TODO(ahe): native should be "const", not "final".
|
| + final source = """final native = 'xyz';
|
| + @native class Foo {}
|
| + main() {}""";
|
| +
|
| + check(compiler, element) {
|
| + return; // TODO(ahe): I'm working on the following.
|
| + Expect.isFalse(element.metadata.isEmpty());
|
| + MetadataAnnotation annotation = element.metadata.head;
|
| + Expect.isNotNull(annotation);
|
| + Constant value = annotation.value;
|
| + print(value);
|
| + }
|
| +
|
| + compileAndCheck(source, 'Foo', check);
|
| +}
|
| +
|
| +void main() {
|
| + testClassMetadata();
|
| +}
|
|
|