OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * Code generation for the file "integration_test_methods.dart". | 6 * Code generation for the file "integration_test_methods.dart". |
7 */ | 7 */ |
8 library codegenInttestMethods; | 8 library codegenInttestMethods; |
9 | 9 |
10 import 'dart:convert'; | 10 import 'dart:convert'; |
(...skipping 27 matching lines...) Expand all Loading... |
38 */ | 38 */ |
39 List<String> fieldInitializationCode = <String>[]; | 39 List<String> fieldInitializationCode = <String>[]; |
40 | 40 |
41 /** | 41 /** |
42 * Code snippets concatenated to produce the contents of the switch statement | 42 * Code snippets concatenated to produce the contents of the switch statement |
43 * for dispatching notifications. | 43 * for dispatching notifications. |
44 */ | 44 */ |
45 List<String> notificationSwitchContents = <String>[]; | 45 List<String> notificationSwitchContents = <String>[]; |
46 | 46 |
47 CodegenInttestMethodsVisitor(Api api) | 47 CodegenInttestMethodsVisitor(Api api) |
48 : super(api), | 48 : toHtmlVisitor = new ToHtmlVisitor(api), |
49 toHtmlVisitor = new ToHtmlVisitor(api) { | 49 super(api) { |
50 codeGeneratorSettings.commentLineLength = 79; | 50 codeGeneratorSettings.commentLineLength = 79; |
51 codeGeneratorSettings.languageName = 'dart'; | 51 codeGeneratorSettings.languageName = 'dart'; |
52 } | 52 } |
53 | 53 |
54 /** | 54 /** |
55 * Generate a function argument for the given parameter field. | 55 * Generate a function argument for the given parameter field. |
56 */ | 56 */ |
57 String formatArgument(TypeObjectField field) => | 57 String formatArgument(TypeObjectField field) => |
58 '${dartType(field.type)} ${field.name}'; | 58 '${dartType(field.type)} ${field.name}'; |
59 | 59 |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 } else { | 260 } else { |
261 writeln('expect(result, isNull);'); | 261 writeln('expect(result, isNull);'); |
262 writeln('return null;'); | 262 writeln('return null;'); |
263 } | 263 } |
264 }); | 264 }); |
265 writeln('});'); | 265 writeln('});'); |
266 }); | 266 }); |
267 writeln('}'); | 267 writeln('}'); |
268 } | 268 } |
269 } | 269 } |
OLD | NEW |