Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: dart/tests/compiler/dart2js/metadata_test.dart

Issue 10879006: Create an outline of metadata API in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/compiler_helper.dart ('k') | dart/tests/compiler/dart2js/return_type_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698