| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 writeln(); | 52 writeln(); |
| 53 writeln("import 'package:unittest/unittest.dart';"); | 53 writeln("import 'package:unittest/unittest.dart';"); |
| 54 writeln(); | 54 writeln(); |
| 55 writeln("import 'integration_tests.dart';"); | 55 writeln("import 'integration_tests.dart';"); |
| 56 writeln("import 'protocol_matchers.dart';"); | 56 writeln("import 'protocol_matchers.dart';"); |
| 57 writeln(); | 57 writeln(); |
| 58 writeln(); | 58 writeln(); |
| 59 writeln('/**'); | 59 writeln('/**'); |
| 60 writeln(' * Convenience methods for running integration tests'); | 60 writeln(' * Convenience methods for running integration tests'); |
| 61 writeln(' */'); | 61 writeln(' */'); |
| 62 writeln('abstract class InttestMixin {'); | 62 writeln('abstract class IntegrationTestMixin {'); |
| 63 indent(() { | 63 indent(() { |
| 64 writeln('Server get server;'); | 64 writeln('Server get server;'); |
| 65 super.visitApi(); | 65 super.visitApi(); |
| 66 writeln(); | 66 writeln(); |
| 67 docComment(toHtmlVisitor.collectHtml(() { | 67 docComment(toHtmlVisitor.collectHtml(() { |
| 68 toHtmlVisitor.writeln('Initialize the fields in InttestMixin, and'); | 68 toHtmlVisitor.writeln('Initialize the fields in InttestMixin, and'); |
| 69 toHtmlVisitor.writeln('ensure that notifications will be handled.'); | 69 toHtmlVisitor.writeln('ensure that notifications will be handled.'); |
| 70 }), false); | 70 }), false); |
| 71 writeln('void initializeInttestMixin() {'); | 71 writeln('void initializeInttestMixin() {'); |
| 72 indent(() { | 72 indent(() { |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 * Translate spec_input.html into protocol_matchers.dart. | 242 * Translate spec_input.html into protocol_matchers.dart. |
| 243 */ | 243 */ |
| 244 main() { | 244 main() { |
| 245 CodegenInttestMethodsVisitor visitor = new CodegenInttestMethodsVisitor( | 245 CodegenInttestMethodsVisitor visitor = new CodegenInttestMethodsVisitor( |
| 246 readApi()); | 246 readApi()); |
| 247 String code = visitor.collectCode(visitor.visitApi); | 247 String code = visitor.collectCode(visitor.visitApi); |
| 248 File outputFile = new File( | 248 File outputFile = new File( |
| 249 '../../test/integration/integration_test_methods.dart'); | 249 '../../test/integration/integration_test_methods.dart'); |
| 250 outputFile.writeAsStringSync(code); | 250 outputFile.writeAsStringSync(code); |
| 251 } | 251 } |
| OLD | NEW |