| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analyzer.test.instrumentation.instrumentation_test; | 5 library analyzer.test.instrumentation.instrumentation_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/instrumentation/instrumentation.dart'; | 9 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| 10 import 'package:test/test.dart'; |
| 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 11 import 'package:unittest/unittest.dart'; | |
| 12 | 12 |
| 13 main() { | 13 main() { |
| 14 group('instrumentation', () { | 14 defineReflectiveTests(InstrumentationServiceTest); |
| 15 defineReflectiveTests(InstrumentationServiceTest); | 15 defineReflectiveTests(MulticastInstrumentationServerTest); |
| 16 defineReflectiveTests(MulticastInstrumentationServerTest); | |
| 17 }); | |
| 18 } | 16 } |
| 19 | 17 |
| 20 @reflectiveTest | 18 @reflectiveTest |
| 21 class InstrumentationServiceTest { | 19 class InstrumentationServiceTest { |
| 22 void assertNormal( | 20 void assertNormal( |
| 23 TestInstrumentationServer server, String tag, String message) { | 21 TestInstrumentationServer server, String tag, String message) { |
| 24 String sent = server.normalChannel.toString(); | 22 String sent = server.normalChannel.toString(); |
| 25 if (!sent.endsWith(':$tag:$message\n')) { | 23 if (!sent.endsWith(':$tag:$message\n')) { |
| 26 fail('Expected "...:$tag:$message", found "$sent"'); | 24 fail('Expected "...:$tag:$message", found "$sent"'); |
| 27 } | 25 } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 @override | 173 @override |
| 176 void logWithPriority(String message) { | 174 void logWithPriority(String message) { |
| 177 priorityChannel.writeln(message); | 175 priorityChannel.writeln(message); |
| 178 } | 176 } |
| 179 | 177 |
| 180 @override | 178 @override |
| 181 Future shutdown() async { | 179 Future shutdown() async { |
| 182 // Ignored | 180 // Ignored |
| 183 } | 181 } |
| 184 } | 182 } |
| OLD | NEW |