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

Side by Side Diff: pkg/smoke/test/static_test.dart

Issue 194813007: Add codegen support in smoke (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
« no previous file with comments | « pkg/smoke/test/common.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 /// ---- AUTOGENERATED: DO NOT EDIT THIS FILE --------------
2 // for details. All rights reserved. Use of this source code is governed by a 2 /// To update this test file, call:
3 // BSD-style license that can be found in the LICENSE file. 3 /// > dart codegen/end_to_end_test.dart --update_static_test
4 /// --------------------------------------------------------
4 5
5 library smoke.test.static_test; 6 library smoke.test.static_test;
6 7
8 import 'package:unittest/unittest.dart';
7 import 'package:smoke/smoke.dart' show Declaration, PROPERTY, METHOD; 9 import 'package:smoke/smoke.dart' show Declaration, PROPERTY, METHOD;
8 import 'package:smoke/static.dart'; 10 import 'package:smoke/static.dart' show useGeneratedCode, StaticConfiguration;
9 import 'package:unittest/unittest.dart'; 11 import 'common.dart' as smoke_0;
10 import 'common.dart' hide main;
11 import 'common.dart' as common show main; 12 import 'common.dart' as common show main;
12 13
13 // Abstract class used to represent the mixing C&A in the smoke configuration. 14 abstract class _M0 {} // C & A
14 abstract class C_with_A {}
15 15
16 // Static configuration that declares only the symbols, getters, methods, and 16 _configure() {
17 // super-class relationships we want to preserve. This and the class above 17 useGeneratedCode(new StaticConfiguration(
18 // should be automatically generated by transformers using smoke. 18 checkedMode: false,
19 var _config = new StaticConfiguration( 19 getters: {
20 getters: { 20 #i: (o) => o.i,
21 #i: (o) => o.i, 21 #inc0: (o) => o.inc0,
22 #j: (o) => o.j, 22 #inc1: (o) => o.inc1,
23 #j2: (o) => o.j2, 23 #inc2: (o) => o.inc2,
24 #inc0: (o) => o.inc0, 24 #j: (o) => o.j,
25 #inc1: (o) => o.inc1, 25 #j2: (o) => o.j2,
26 #inc2: (o) => o.inc2,
27 },
28 setters: {
29 #i: (o, v) { o.i = v; },
30 #j2: (o, v) { o.j2 = v; },
31 },
32 // TODO(sigmund): this could be a const map, but that triggers
33 // dartbug.com/17123
34 // TODO(sigmund): before doing codegen for this, consider changing smoke's
35 // defaults so we don't need to specify obvious things like `int`, or `*:
36 // Object`.
37 parents: {
38 Annot: Object,
39 AnnotB: Annot,
40 A: Object,
41 B: Object,
42 C: Object,
43 C_with_A: C,
44 D: C_with_A,
45 E: Object,
46 E2: E,
47 F: Object,
48 F2: F,
49 G: Object,
50 H: G,
51 int: Object,
52 },
53 declarations: {
54 B: {
55 #a: const Declaration(#a, A),
56 #w: const Declaration(#w, int, kind: PROPERTY),
57 #f: const Declaration(#f, int, isFinal: true),
58 }, 26 },
59 A: { 27 setters: {
60 #i: const Declaration(#i, int), 28 #i: (o, v) { o.i = v; },
61 #j: const Declaration(#j, int), 29 #j2: (o, v) { o.j2 = v; },
62 #j2: const Declaration(#j2, int, kind: PROPERTY),
63 #inc0: const Declaration(#inc0, Function, kind: METHOD),
64 #inc1: const Declaration(#inc1, Function, kind: METHOD),
65 #inc2: const Declaration(#inc2, Function, kind: METHOD),
66 }, 30 },
67 C: { 31 parents: {
68 #x: const Declaration(#x, int), 32 smoke_0.AnnotB: smoke_0.Annot,
69 #y: const Declaration(#y, String), 33 smoke_0.D: _M0,
70 #b: const Declaration(#b, B), 34 smoke_0.E2: smoke_0.E,
71 #inc: const Declaration(#inc, Function, kind: METHOD), 35 smoke_0.F2: smoke_0.F,
36 smoke_0.H: smoke_0.G,
37 _M0: smoke_0.C,
72 }, 38 },
73 C_with_A: { 39 declarations: {
74 #i: const Declaration(#i, int), 40 smoke_0.A: {
75 #j: const Declaration(#j, int), 41 #i: const Declaration(#i, int),
76 #j2: const Declaration(#j2, int, kind: PROPERTY), 42 #inc0: const Declaration(#inc0, Function, kind: METHOD),
77 #inc0: const Declaration(#inc0, Function, kind: METHOD), 43 #inc1: const Declaration(#inc1, Function, kind: METHOD),
78 #inc1: const Declaration(#inc1, Function, kind: METHOD), 44 #inc2: const Declaration(#inc2, Function, kind: METHOD),
79 #inc2: const Declaration(#inc2, Function, kind: METHOD), 45 #j: const Declaration(#j, int),
46 #j2: const Declaration(#j2, int, kind: PROPERTY),
47 },
48 smoke_0.B: {
49 #a: const Declaration(#a, smoke_0.A),
50 #f: const Declaration(#f, int, isFinal: true),
51 #w: const Declaration(#w, int, kind: PROPERTY),
52 },
53 smoke_0.C: {
54 #b: const Declaration(#b, smoke_0.B),
55 #inc: const Declaration(#inc, Function, kind: METHOD),
56 #x: const Declaration(#x, int),
57 #y: const Declaration(#y, String),
58 },
59 smoke_0.D: {
60 #i2: const Declaration(#i2, int, kind: PROPERTY, isFinal: true),
61 #x2: const Declaration(#x2, int, kind: PROPERTY, isFinal: true),
62 },
63 smoke_0.E: {
64 #noSuchMethod: const Declaration(#noSuchMethod, Function, kind: METHOD ),
65 #y: const Declaration(#y, int, kind: PROPERTY, isFinal: true),
66 },
67 smoke_0.E2: const {},
68 smoke_0.F: {
69 #staticMethod: const Declaration(#staticMethod, Function, kind: METHOD , isStatic: true),
70 },
71 smoke_0.F2: const {},
72 smoke_0.G: {
73 #b: const Declaration(#b, int, annotations: const [smoke_0.a1]),
74 #d: const Declaration(#d, int, annotations: const [smoke_0.a2]),
75 },
76 smoke_0.H: {
77 #f: const Declaration(#f, int, annotations: const [smoke_0.a1]),
78 #g: const Declaration(#g, int, annotations: const [smoke_0.a1]),
79 #h: const Declaration(#h, int, annotations: const [smoke_0.a2]),
80 #i: const Declaration(#i, int, annotations: const [smoke_0.a3]),
81 },
82 _M0: {
83 #i: const Declaration(#i, int),
84 #inc: const Declaration(#inc, Function, kind: METHOD),
85 #inc0: const Declaration(#inc0, Function, kind: METHOD),
86 #j: const Declaration(#j, int),
87 #j2: const Declaration(#j2, int, kind: PROPERTY),
88 },
80 }, 89 },
81 D: { 90 names: {
82 #x2: const Declaration(#x2, int, kind: PROPERTY), 91 #i: 'i',
83 #i2: const Declaration(#i2, int, kind: PROPERTY), 92 }));
84 }, 93 }
85 E: {
86 #y: const Declaration(#y, int, isFinal: true, kind: PROPERTY),
87 #noSuchMethod:
88 const Declaration(#noSuchMethody, Function, kind: METHOD),
89 },
90 E2: const {},
91 F: {#staticMethod: const Declaration(#staticMethod, Function,
92 kind: METHOD, isStatic: true)},
93 F2: const {},
94 G: {
95 #a: const Declaration(#a, int),
96 #b: const Declaration(#b, int, annotations: const [a1]),
97 #c: const Declaration(#c, int),
98 #d: const Declaration(#d, int, annotations: const [a2]),
99 },
100 H: {
101 #e: const Declaration(#e, int),
102 #f: const Declaration(#f, int, annotations: const [a1]),
103 #g: const Declaration(#g, int, annotations: const [a1]),
104 #h: const Declaration(#h, int, annotations: const [a2]),
105 #i: const Declaration(#i, int, annotations: const [a3]),
106 },
107 },
108 names: {#i: 'i'});
109 94
110 main() { 95 main() {
111 setUp(() => useGeneratedCode(_config)); 96 setUp(_configure);
112 common.main(); 97 common.main();
113 } 98 }
OLDNEW
« no previous file with comments | « pkg/smoke/test/common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698