| 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 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/codegen/tools.dart'; | 10 import 'package:analyzer/src/codegen/tools.dart'; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 writeln(' */'); | 104 writeln(' */'); |
| 105 writeln("import 'dart:async';"); | 105 writeln("import 'dart:async';"); |
| 106 writeln(); | 106 writeln(); |
| 107 writeln("import 'package:$packageName/protocol/protocol_generated.dart';"); | 107 writeln("import 'package:$packageName/protocol/protocol_generated.dart';"); |
| 108 writeln( | 108 writeln( |
| 109 "import 'package:$packageName/src/protocol/protocol_internal.dart';"); | 109 "import 'package:$packageName/src/protocol/protocol_internal.dart';"); |
| 110 writeln("import 'package:test/test.dart';"); | 110 writeln("import 'package:test/test.dart';"); |
| 111 writeln(); | 111 writeln(); |
| 112 writeln("import 'integration_tests.dart';"); | 112 writeln("import 'integration_tests.dart';"); |
| 113 writeln("import 'protocol_matchers.dart';"); | 113 writeln("import 'protocol_matchers.dart';"); |
| 114 for (String uri in api.types.importUris) { |
| 115 write("import '"); |
| 116 write(uri); |
| 117 writeln("';"); |
| 118 } |
| 114 writeln(); | 119 writeln(); |
| 115 writeln('/**'); | 120 writeln('/**'); |
| 116 writeln(' * Convenience methods for running integration tests'); | 121 writeln(' * Convenience methods for running integration tests'); |
| 117 writeln(' */'); | 122 writeln(' */'); |
| 118 writeln('abstract class IntegrationTestMixin {'); | 123 writeln('abstract class IntegrationTestMixin {'); |
| 119 indent(() { | 124 indent(() { |
| 120 writeln('Server get server;'); | 125 writeln('Server get server;'); |
| 121 super.visitApi(); | 126 super.visitApi(); |
| 122 writeln(); | 127 writeln(); |
| 123 docComment(toHtmlVisitor.collectHtml(() { | 128 docComment(toHtmlVisitor.collectHtml(() { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 writeln('ResponseDecoder decoder = new ResponseDecoder($kind);'); | 265 writeln('ResponseDecoder decoder = new ResponseDecoder($kind);'); |
| 261 writeln("return new $resultClass.fromJson(decoder, 'result', result);"); | 266 writeln("return new $resultClass.fromJson(decoder, 'result', result);"); |
| 262 } else { | 267 } else { |
| 263 writeln('outOfTestExpect(result, isNull);'); | 268 writeln('outOfTestExpect(result, isNull);'); |
| 264 writeln('return null;'); | 269 writeln('return null;'); |
| 265 } | 270 } |
| 266 }); | 271 }); |
| 267 writeln('}'); | 272 writeln('}'); |
| 268 } | 273 } |
| 269 } | 274 } |
| OLD | NEW |