Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: packages/analyzer/test/instrumentation/instrumentation_test.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 test.instrumentation; 5 library analyzer.test.instrumentation.instrumentation_test;
6
7 import 'dart:async';
6 8
7 import 'package:analyzer/instrumentation/instrumentation.dart'; 9 import 'package:analyzer/instrumentation/instrumentation.dart';
10 import 'package:test_reflective_loader/test_reflective_loader.dart';
8 import 'package:unittest/unittest.dart'; 11 import 'package:unittest/unittest.dart';
9 12
10 import '../reflective_tests.dart';
11
12 main() { 13 main() {
13 group('instrumentation', () { 14 group('instrumentation', () {
14 runReflectiveTests(InstrumentationServiceTest); 15 defineReflectiveTests(InstrumentationServiceTest);
15 runReflectiveTests(MulticastInstrumentationServerTest); 16 defineReflectiveTests(MulticastInstrumentationServerTest);
16 }); 17 });
17 } 18 }
18 19
19 @reflectiveTest 20 @reflectiveTest
20 class InstrumentationServiceTest { 21 class InstrumentationServiceTest {
21 void assertNormal( 22 void assertNormal(
22 TestInstrumentationServer server, String tag, String message) { 23 TestInstrumentationServer server, String tag, String message) {
23 String sent = server.normalChannel.toString(); 24 String sent = server.normalChannel.toString();
24 if (!sent.endsWith(':$tag:$message\n')) { 25 if (!sent.endsWith(':$tag:$message\n')) {
25 fail('Expected "...:$tag:$message", found "$sent"'); 26 fail('Expected "...:$tag:$message", found "$sent"');
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 fail('Expected "...$message", found "$sent"'); 158 fail('Expected "...$message", found "$sent"');
158 } 159 }
159 } 160 }
160 } 161 }
161 162
162 class TestInstrumentationServer implements InstrumentationServer { 163 class TestInstrumentationServer implements InstrumentationServer {
163 StringBuffer normalChannel = new StringBuffer(); 164 StringBuffer normalChannel = new StringBuffer();
164 StringBuffer priorityChannel = new StringBuffer(); 165 StringBuffer priorityChannel = new StringBuffer();
165 166
166 @override 167 @override
168 String get sessionId => '';
169
170 @override
167 void log(String message) { 171 void log(String message) {
168 normalChannel.writeln(message); 172 normalChannel.writeln(message);
169 } 173 }
170 174
171 @override 175 @override
172 void logWithPriority(String message) { 176 void logWithPriority(String message) {
173 priorityChannel.writeln(message); 177 priorityChannel.writeln(message);
174 } 178 }
175 179
176 @override 180 @override
177 void shutdown() { 181 Future shutdown() async {
178 // Ignored 182 // Ignored
179 } 183 }
180 } 184 }
OLDNEW
« no previous file with comments | « packages/analyzer/test/generated/utilities_test.dart ('k') | packages/analyzer/test/instrumentation/test_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698