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

Unified Diff: pkg/smoke/test/codegen/recorder_test.dart

Issue 278413002: Fix code generation in polymer: we avoided generating types above HtmlElement in (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/smoke/test/codegen/recorder_test.dart
diff --git a/pkg/smoke/test/codegen/recorder_test.dart b/pkg/smoke/test/codegen/recorder_test.dart
index a81a0d7821b05f458501c514fb5e81955ed38fe8..091abac3f85458a87cead3bc9baf4de2efaef4bc 100644
--- a/pkg/smoke/test/codegen/recorder_test.dart
+++ b/pkg/smoke/test/codegen/recorder_test.dart
@@ -328,6 +328,49 @@ main() {
' },\n'
' }));\n');
});
+
+ test('inherited field - recursive deep', () {
+ recorder.lookupMember(lib.getType('J3'), 'i', recursive: true,
+ includeAccessors: false);
+ checkResults(generator,
+ imports: [
+ "import '/common.dart' as smoke_0;",
+ ],
+ initCall:
+ 'useGeneratedCode(new StaticConfiguration(\n'
+ ' checkedMode: false,\n'
+ ' parents: {\n'
+ ' smoke_0.J2: smoke_0.J1,\n'
+ ' smoke_0.J3: smoke_0.J2,\n'
+ ' },\n'
+ ' declarations: {\n'
+ ' smoke_0.J1: {\n'
+ ' #i: const Declaration(#i, int),\n'
+ ' },\n'
+ ' smoke_0.J2: const {},\n'
+ ' smoke_0.J3: const {},\n'
+ ' }));\n');
+ });
+
+ test('inherited field - recursive - includeUpTo', () {
+ recorder.lookupMember(lib.getType('J3'), 'i', recursive: true,
+ includeAccessors: false, includeUpTo: lib.getType('J1'));
+ checkResults(generator,
+ imports: [
+ "import '/common.dart' as smoke_0;",
+ ],
+ initCall:
+ 'useGeneratedCode(new StaticConfiguration(\n'
+ ' checkedMode: false,\n'
+ ' parents: {\n'
+ ' smoke_0.J2: smoke_0.J1,\n'
+ ' smoke_0.J3: smoke_0.J2,\n'
+ ' },\n'
+ ' declarations: {\n'
+ ' smoke_0.J2: const {},\n'
+ ' smoke_0.J3: const {},\n'
+ ' }));\n');
+ });
});
group('query', () {
@@ -786,6 +829,14 @@ const _SOURCES = const {
G get i3;
G m4() {};
}
+
+ class J1 {
+ int i;
+ }
+ class J2 extends J1 {
+ }
+ class J3 extends J2 {
+ }
'''
};
« no previous file with comments | « pkg/smoke/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698