| 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 library testing.abstract_context; | 5 library testing.abstract_context; |
| 6 | 6 |
| 7 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
| 8 import 'package:analyzer/file_system/memory_file_system.dart'; | 8 import 'package:analyzer/file_system/memory_file_system.dart'; |
| 9 import 'package:analyzer/source/package_map_resolver.dart'; | 9 import 'package:analyzer/source/package_map_resolver.dart'; |
| 10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 @override | 120 @override |
| 121 void logError(String message, [CaughtException exception]) { | 121 void logError(String message, [CaughtException exception]) { |
| 122 print(message); | 122 print(message); |
| 123 if (exception != null) { | 123 if (exception != null) { |
| 124 print(exception); | 124 print(exception); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 | 127 |
| 128 @override | 128 @override |
| 129 void logError2(String message, Object exception) { | |
| 130 print(message); | |
| 131 if (exception != null) { | |
| 132 print(exception); | |
| 133 } | |
| 134 } | |
| 135 | |
| 136 @override | |
| 137 void logInformation(String message, [CaughtException exception]) { | 129 void logInformation(String message, [CaughtException exception]) { |
| 138 print(message); | 130 print(message); |
| 139 if (exception != null) { | 131 if (exception != null) { |
| 140 print(exception); | 132 print(exception); |
| 141 } | 133 } |
| 142 } | 134 } |
| 143 | |
| 144 @override | |
| 145 void logInformation2(String message, Object exception) { | |
| 146 print(message); | |
| 147 if (exception != null) { | |
| 148 print(exception); | |
| 149 } | |
| 150 } | |
| 151 } | 135 } |
| 152 | 136 |
| 153 /** | 137 /** |
| 154 * Wraps the given [_ElementVisitorFunction] into an instance of | 138 * Wraps the given [_ElementVisitorFunction] into an instance of |
| 155 * [engine.GeneralizingElementVisitor]. | 139 * [engine.GeneralizingElementVisitor]. |
| 156 */ | 140 */ |
| 157 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { | 141 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor { |
| 158 final _ElementVisitorFunction function; | 142 final _ElementVisitorFunction function; |
| 159 _ElementVisitorFunctionWrapper(this.function); | 143 _ElementVisitorFunctionWrapper(this.function); |
| 160 visitElement(Element element) { | 144 visitElement(Element element) { |
| 161 function(element); | 145 function(element); |
| 162 super.visitElement(element); | 146 super.visitElement(element); |
| 163 } | 147 } |
| 164 } | 148 } |
| OLD | NEW |