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

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

Issue 2890193002: Make instrumentation data structure more regular (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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/test.dart';
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 assertNormal(server, InstrumentationService.TAG_PLUGIN_EXCEPTION, 121 assertNormal(server, InstrumentationService.TAG_PLUGIN_EXCEPTION,
122 '$message:$stackTraceText:path:name:version'); 122 '$message:$stackTraceText:path:name:version');
123 } 123 }
124 124
125 void test_logPluginNotification() { 125 void test_logPluginNotification() {
126 TestInstrumentationServer server = new TestInstrumentationServer(); 126 TestInstrumentationServer server = new TestInstrumentationServer();
127 InstrumentationService service = new InstrumentationService(server); 127 InstrumentationService service = new InstrumentationService(server);
128 String notification = 'notification'; 128 String notification = 'notification';
129 service.logPluginNotification('path', notification); 129 service.logPluginNotification('path', notification);
130 assertNormal(server, InstrumentationService.TAG_PLUGIN_NOTIFICATION, 130 assertNormal(server, InstrumentationService.TAG_PLUGIN_NOTIFICATION,
131 'path:$notification'); 131 '$notification:path::');
132 } 132 }
133 133
134 void test_logPluginRequest() { 134 void test_logPluginRequest() {
135 TestInstrumentationServer server = new TestInstrumentationServer(); 135 TestInstrumentationServer server = new TestInstrumentationServer();
136 InstrumentationService service = new InstrumentationService(server); 136 InstrumentationService service = new InstrumentationService(server);
137 String request = 'request'; 137 String request = 'request';
138 service.logPluginRequest('path', request); 138 service.logPluginRequest('path', request);
139 assertNormal( 139 assertNormal(
140 server, InstrumentationService.TAG_PLUGIN_REQUEST, 'path:$request'); 140 server, InstrumentationService.TAG_PLUGIN_REQUEST, '$request:path::');
141 } 141 }
142 142
143 void test_logPluginResponse() { 143 void test_logPluginResponse() {
144 TestInstrumentationServer server = new TestInstrumentationServer(); 144 TestInstrumentationServer server = new TestInstrumentationServer();
145 InstrumentationService service = new InstrumentationService(server); 145 InstrumentationService service = new InstrumentationService(server);
146 String response = 'response'; 146 String response = 'response';
147 service.logPluginResponse('path', response); 147 service.logPluginResponse('path', response);
148 assertNormal( 148 assertNormal(
149 server, InstrumentationService.TAG_PLUGIN_RESPONSE, 'path:$response'); 149 server, InstrumentationService.TAG_PLUGIN_RESPONSE, '$response:path::');
150 } 150 }
151 151
152 void test_logPluginTimeout() { 152 void test_logPluginTimeout() {
153 TestInstrumentationServer server = new TestInstrumentationServer(); 153 TestInstrumentationServer server = new TestInstrumentationServer();
154 InstrumentationService service = new InstrumentationService(server); 154 InstrumentationService service = new InstrumentationService(server);
155 PluginData plugin = new PluginData('path', 'name', 'version'); 155 PluginData plugin = new PluginData('path', 'name', 'version');
156 String request = 'request'; 156 String request = 'request';
157 service.logPluginTimeout(plugin, request); 157 service.logPluginTimeout(plugin, request);
158 assertNormal(server, InstrumentationService.TAG_PLUGIN_TIMEOUT, 158 assertNormal(server, InstrumentationService.TAG_PLUGIN_TIMEOUT,
159 '$request:path:name:version'); 159 '$request:path:name:version');
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 @override 247 @override
248 void logWithPriority(String message) { 248 void logWithPriority(String message) {
249 priorityChannel.writeln(message); 249 priorityChannel.writeln(message);
250 } 250 }
251 251
252 @override 252 @override
253 Future shutdown() async { 253 Future shutdown() async {
254 // Ignored 254 // Ignored
255 } 255 }
256 } 256 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/instrumentation/instrumentation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698