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

Unified Diff: pkg/smoke/test/static_test.dart

Issue 169913004: Adding package:smoke. This CL includes the intial APIs, a mirror-based (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/smoke/test/mirrors_used_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/smoke/test/static_test.dart
diff --git a/pkg/smoke/test/static_test.dart b/pkg/smoke/test/static_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..bd9ef20ea5c3f49cebc93d39196f0ae9f254aa41
--- /dev/null
+++ b/pkg/smoke/test/static_test.dart
@@ -0,0 +1,104 @@
+// Copyright (c) 2014, 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.
+
+library smoke.test.static_test;
+
+import 'package:smoke/smoke.dart' show Declaration;
+import 'package:smoke/static.dart';
+import 'package:unittest/unittest.dart';
+import 'common.dart' hide main;
+import 'common.dart' as common show main;
+
+// Abstract class used to represent the mixing C&A in the smoke configuration.
+abstract class C_with_A {}
+
+// Static configuration that declares only the symbols, getters, methods, and
+// super-class relationships we want to preserve. This and the class above
+// should be automatically generated by transformers using smoke.
+var _config = new StaticConfiguration(
+ getters: {
+ #i: (o) => o.i,
+ #j: (o) => o.j,
+ #j2: (o) => o.j2,
+ #inc0: (o) => o.inc0,
+ #inc1: (o) => o.inc1,
+ #inc2: (o) => o.inc2,
+ },
+ setters: {
+ #i: (o, v) { o.i = v; },
+ #j2: (o, v) { o.j2 = v; },
+ },
+ parents: const {
+ A: Object,
+ B: Object,
+ C: Object,
+ C_with_A: C,
+ D: C_with_A,
+ E: Object,
+ E2: E,
+ F: Object,
+ F2: F,
+ G: Object,
+ H: G,
+ },
+ declarations: {
+ B: {
+ #a: const Declaration(#a, A),
+ #w: const Declaration(#w, int),
+ #f: const Declaration(#f, int, isFinal: true),
+ },
+ A: {
+ #i: const Declaration(#i, int),
+ #j: const Declaration(#j, int),
+ #j2: const Declaration(#j2, int),
+ #inc0: const Declaration(#inc0, Function, isMethod: true),
+ #inc1: const Declaration(#inc1, Function, isMethod: true),
+ #inc2: const Declaration(#inc2, Function, isMethod: true),
+ },
+ C: {
+ #x: const Declaration(#x, int),
+ #y: const Declaration(#y, String),
+ #b: const Declaration(#b, B),
+ #inc: const Declaration(#inc, Function, isMethod: true),
+ },
+ C_with_A: {
+ #i: const Declaration(#i, int),
+ #j: const Declaration(#j, int),
+ #j2: const Declaration(#j2, int),
+ #inc0: const Declaration(#inc0, Function, isMethod: true),
+ #inc1: const Declaration(#inc1, Function, isMethod: true),
+ #inc2: const Declaration(#inc2, Function, isMethod: true),
+ },
+ D: {
+ #x2: const Declaration(#x2, int),
+ #i2: const Declaration(#i2, int),
+ },
+ E: {
+ #y: const Declaration(#y, int, isFinal: true),
+ #noSuchMethod:
+ const Declaration(#noSuchMethody, Function, isMethod: true),
+ },
+ E2: const {},
+ F: {#staticMethod: const Declaration(#staticMethod, Function,
+ isMethod: true, isStatic: true)},
+ F2: const {},
+ G: {
+ #a: const Declaration(#a, int),
+ #b: const Declaration(#b, int, annotations: const [a1]),
+ #c: const Declaration(#c, int),
+ #d: const Declaration(#d, int, annotations: const [a2]),
+ },
+ H: {
+ #e: const Declaration(#e, int),
+ #f: const Declaration(#f, int, annotations: const [a1]),
+ #g: const Declaration(#g, int, annotations: const [a1]),
+ #h: const Declaration(#h, int, annotations: const [a2]),
+ },
+ },
+ names: {#i: 'i'});
+
+main() {
+ setUp(() => useGeneratedCode(_config));
+ common.main();
+}
« no previous file with comments | « pkg/smoke/test/mirrors_used_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698