OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library smoke.test.static_test; |
| 6 |
| 7 import 'package:smoke/smoke.dart' show Declaration; |
| 8 import 'package:smoke/static.dart'; |
| 9 import 'package:unittest/unittest.dart'; |
| 10 import 'common.dart' hide main; |
| 11 import 'common.dart' as common show main; |
| 12 |
| 13 // Abstract class used to represent the mixing C&A in the smoke configuration. |
| 14 abstract class C_with_A {} |
| 15 |
| 16 // Static configuration that declares only the symbols, getters, methods, and |
| 17 // super-class relationships we want to preserve. This and the class above |
| 18 // should be automatically generated by transformers using smoke. |
| 19 var _config = new StaticConfiguration( |
| 20 getters: { |
| 21 #i: (o) => o.i, |
| 22 #j: (o) => o.j, |
| 23 #j2: (o) => o.j2, |
| 24 #inc0: (o) => o.inc0, |
| 25 #inc1: (o) => o.inc1, |
| 26 #inc2: (o) => o.inc2, |
| 27 }, |
| 28 setters: { |
| 29 #i: (o, v) { o.i = v; }, |
| 30 #j2: (o, v) { o.j2 = v; }, |
| 31 }, |
| 32 parents: const { |
| 33 A: Object, |
| 34 B: Object, |
| 35 C: Object, |
| 36 C_with_A: C, |
| 37 D: C_with_A, |
| 38 E: Object, |
| 39 E2: E, |
| 40 F: Object, |
| 41 F2: F, |
| 42 G: Object, |
| 43 H: G, |
| 44 }, |
| 45 declarations: { |
| 46 B: { |
| 47 #a: const Declaration(#a, A), |
| 48 #w: const Declaration(#w, int), |
| 49 #f: const Declaration(#f, int, isFinal: true), |
| 50 }, |
| 51 A: { |
| 52 #i: const Declaration(#i, int), |
| 53 #j: const Declaration(#j, int), |
| 54 #j2: const Declaration(#j2, int), |
| 55 #inc0: const Declaration(#inc0, Function, isMethod: true), |
| 56 #inc1: const Declaration(#inc1, Function, isMethod: true), |
| 57 #inc2: const Declaration(#inc2, Function, isMethod: true), |
| 58 }, |
| 59 C: { |
| 60 #x: const Declaration(#x, int), |
| 61 #y: const Declaration(#y, String), |
| 62 #b: const Declaration(#b, B), |
| 63 #inc: const Declaration(#inc, Function, isMethod: true), |
| 64 }, |
| 65 C_with_A: { |
| 66 #i: const Declaration(#i, int), |
| 67 #j: const Declaration(#j, int), |
| 68 #j2: const Declaration(#j2, int), |
| 69 #inc0: const Declaration(#inc0, Function, isMethod: true), |
| 70 #inc1: const Declaration(#inc1, Function, isMethod: true), |
| 71 #inc2: const Declaration(#inc2, Function, isMethod: true), |
| 72 }, |
| 73 D: { |
| 74 #x2: const Declaration(#x2, int), |
| 75 #i2: const Declaration(#i2, int), |
| 76 }, |
| 77 E: { |
| 78 #y: const Declaration(#y, int, isFinal: true), |
| 79 #noSuchMethod: |
| 80 const Declaration(#noSuchMethody, Function, isMethod: true), |
| 81 }, |
| 82 E2: const {}, |
| 83 F: {#staticMethod: const Declaration(#staticMethod, Function, |
| 84 isMethod: true, isStatic: true)}, |
| 85 F2: const {}, |
| 86 G: { |
| 87 #a: const Declaration(#a, int), |
| 88 #b: const Declaration(#b, int, annotations: const [a1]), |
| 89 #c: const Declaration(#c, int), |
| 90 #d: const Declaration(#d, int, annotations: const [a2]), |
| 91 }, |
| 92 H: { |
| 93 #e: const Declaration(#e, int), |
| 94 #f: const Declaration(#f, int, annotations: const [a1]), |
| 95 #g: const Declaration(#g, int, annotations: const [a1]), |
| 96 #h: const Declaration(#h, int, annotations: const [a2]), |
| 97 }, |
| 98 }, |
| 99 names: {#i: 'i'}); |
| 100 |
| 101 main() { |
| 102 setUp(() => useGeneratedCode(_config)); |
| 103 common.main(); |
| 104 } |
OLD | NEW |