Index: pkg/smoke/test/static_test.dart |
diff --git a/pkg/smoke/test/static_test.dart b/pkg/smoke/test/static_test.dart |
index 9ede1382ddc6b8b475f450a3f224da455b317c58..a92adc49ef3ad1c49d24e30532fdb1816bddf333 100644 |
--- a/pkg/smoke/test/static_test.dart |
+++ b/pkg/smoke/test/static_test.dart |
@@ -1,113 +1,98 @@ |
-// 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. |
+/// ---- AUTOGENERATED: DO NOT EDIT THIS FILE -------------- |
+/// To update this test file, call: |
+/// > dart codegen/end_to_end_test.dart --update_static_test |
+/// -------------------------------------------------------- |
library smoke.test.static_test; |
-import 'package:smoke/smoke.dart' show Declaration, PROPERTY, METHOD; |
-import 'package:smoke/static.dart'; |
import 'package:unittest/unittest.dart'; |
-import 'common.dart' hide main; |
+import 'package:smoke/smoke.dart' show Declaration, PROPERTY, METHOD; |
+import 'package:smoke/static.dart' show useGeneratedCode, StaticConfiguration; |
+import 'common.dart' as smoke_0; |
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 {} |
+abstract class _M0 {} // C & 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; }, |
- }, |
- // TODO(sigmund): this could be a const map, but that triggers |
- // dartbug.com/17123 |
- // TODO(sigmund): before doing codegen for this, consider changing smoke's |
- // defaults so we don't need to specify obvious things like `int`, or `*: |
- // Object`. |
- parents: { |
- Annot: Object, |
- AnnotB: Annot, |
- 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, |
- int: Object, |
- }, |
- declarations: { |
- B: { |
- #a: const Declaration(#a, A), |
- #w: const Declaration(#w, int, kind: PROPERTY), |
- #f: const Declaration(#f, int, isFinal: true), |
- }, |
- A: { |
- #i: const Declaration(#i, int), |
- #j: const Declaration(#j, int), |
- #j2: const Declaration(#j2, int, kind: PROPERTY), |
- #inc0: const Declaration(#inc0, Function, kind: METHOD), |
- #inc1: const Declaration(#inc1, Function, kind: METHOD), |
- #inc2: const Declaration(#inc2, Function, kind: METHOD), |
- }, |
- C: { |
- #x: const Declaration(#x, int), |
- #y: const Declaration(#y, String), |
- #b: const Declaration(#b, B), |
- #inc: const Declaration(#inc, Function, kind: METHOD), |
+_configure() { |
+ useGeneratedCode(new StaticConfiguration( |
+ checkedMode: false, |
+ getters: { |
+ #i: (o) => o.i, |
+ #inc0: (o) => o.inc0, |
+ #inc1: (o) => o.inc1, |
+ #inc2: (o) => o.inc2, |
+ #j: (o) => o.j, |
+ #j2: (o) => o.j2, |
}, |
- C_with_A: { |
- #i: const Declaration(#i, int), |
- #j: const Declaration(#j, int), |
- #j2: const Declaration(#j2, int, kind: PROPERTY), |
- #inc0: const Declaration(#inc0, Function, kind: METHOD), |
- #inc1: const Declaration(#inc1, Function, kind: METHOD), |
- #inc2: const Declaration(#inc2, Function, kind: METHOD), |
+ setters: { |
+ #i: (o, v) { o.i = v; }, |
+ #j2: (o, v) { o.j2 = v; }, |
}, |
- D: { |
- #x2: const Declaration(#x2, int, kind: PROPERTY), |
- #i2: const Declaration(#i2, int, kind: PROPERTY), |
+ parents: { |
+ smoke_0.AnnotB: smoke_0.Annot, |
+ smoke_0.D: _M0, |
+ smoke_0.E2: smoke_0.E, |
+ smoke_0.F2: smoke_0.F, |
+ smoke_0.H: smoke_0.G, |
+ _M0: smoke_0.C, |
}, |
- E: { |
- #y: const Declaration(#y, int, isFinal: true, kind: PROPERTY), |
- #noSuchMethod: |
- const Declaration(#noSuchMethody, Function, kind: METHOD), |
+ declarations: { |
+ smoke_0.A: { |
+ #i: const Declaration(#i, int), |
+ #inc0: const Declaration(#inc0, Function, kind: METHOD), |
+ #inc1: const Declaration(#inc1, Function, kind: METHOD), |
+ #inc2: const Declaration(#inc2, Function, kind: METHOD), |
+ #j: const Declaration(#j, int), |
+ #j2: const Declaration(#j2, int, kind: PROPERTY), |
+ }, |
+ smoke_0.B: { |
+ #a: const Declaration(#a, smoke_0.A), |
+ #f: const Declaration(#f, int, isFinal: true), |
+ #w: const Declaration(#w, int, kind: PROPERTY), |
+ }, |
+ smoke_0.C: { |
+ #b: const Declaration(#b, smoke_0.B), |
+ #inc: const Declaration(#inc, Function, kind: METHOD), |
+ #x: const Declaration(#x, int), |
+ #y: const Declaration(#y, String), |
+ }, |
+ smoke_0.D: { |
+ #i2: const Declaration(#i2, int, kind: PROPERTY, isFinal: true), |
+ #x2: const Declaration(#x2, int, kind: PROPERTY, isFinal: true), |
+ }, |
+ smoke_0.E: { |
+ #noSuchMethod: const Declaration(#noSuchMethod, Function, kind: METHOD), |
+ #y: const Declaration(#y, int, kind: PROPERTY, isFinal: true), |
+ }, |
+ smoke_0.E2: const {}, |
+ smoke_0.F: { |
+ #staticMethod: const Declaration(#staticMethod, Function, kind: METHOD, isStatic: true), |
+ }, |
+ smoke_0.F2: const {}, |
+ smoke_0.G: { |
+ #b: const Declaration(#b, int, annotations: const [smoke_0.a1]), |
+ #d: const Declaration(#d, int, annotations: const [smoke_0.a2]), |
+ }, |
+ smoke_0.H: { |
+ #f: const Declaration(#f, int, annotations: const [smoke_0.a1]), |
+ #g: const Declaration(#g, int, annotations: const [smoke_0.a1]), |
+ #h: const Declaration(#h, int, annotations: const [smoke_0.a2]), |
+ #i: const Declaration(#i, int, annotations: const [smoke_0.a3]), |
+ }, |
+ _M0: { |
+ #i: const Declaration(#i, int), |
+ #inc: const Declaration(#inc, Function, kind: METHOD), |
+ #inc0: const Declaration(#inc0, Function, kind: METHOD), |
+ #j: const Declaration(#j, int), |
+ #j2: const Declaration(#j2, int, kind: PROPERTY), |
+ }, |
}, |
- E2: const {}, |
- F: {#staticMethod: const Declaration(#staticMethod, Function, |
- kind: METHOD, 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]), |
- #i: const Declaration(#i, int, annotations: const [a3]), |
- }, |
- }, |
- names: {#i: 'i'}); |
+ names: { |
+ #i: 'i', |
+ })); |
+} |
main() { |
- setUp(() => useGeneratedCode(_config)); |
+ setUp(_configure); |
common.main(); |
} |