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

Side by Side Diff: pkg/analysis_server/test/protocol_test.dart

Issue 757613002: new onPriorityChanged event stream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.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) 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 test.protocol; 5 library test.protocol;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analysis_server/src/constants.dart'; 9 import 'package:analysis_server/src/constants.dart';
10 import 'package:analysis_server/src/protocol.dart'; 10 import 'package:analysis_server/src/protocol.dart';
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 Response.ID: '', 217 Response.ID: '',
218 Response.ERROR: { 218 Response.ERROR: {
219 'code': 'INVALID_REQUEST', 219 'code': 'INVALID_REQUEST',
220 'message': 'Invalid request' 220 'message': 'Invalid request'
221 } 221 }
222 })); 222 }));
223 } 223 }
224 224
225 void test_create_unanalyzedPriorityFiles() { 225 void test_create_unanalyzedPriorityFiles() {
226 Response response = 226 Response response =
227 new Response.unanalyzedPriorityFiles(new Request('0', ''), 'file list'); 227 new Response.unanalyzedPriorityFiles('0', 'file list');
228 expect(response.id, equals('0')); 228 expect(response.id, equals('0'));
229 expect(response.error, isNotNull); 229 expect(response.error, isNotNull);
230 expect(response.toJson(), equals({ 230 expect(response.toJson(), equals({
231 Response.ID: '0', 231 Response.ID: '0',
232 Response.ERROR: { 232 Response.ERROR: {
233 'code': 'UNANALYZED_PRIORITY_FILES', 233 'code': 'UNANALYZED_PRIORITY_FILES',
234 'message': "Unanalyzed files cannot be a priority: 'file list'" 234 'message': "Unanalyzed files cannot be a priority: 'file list'"
235 } 235 }
236 })); 236 }));
237 } 237 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 Response original = new Response('myId', result: { 269 Response original = new Response('myId', result: {
270 'foo': 'bar' 270 'foo': 'bar'
271 }); 271 });
272 Response response = new Response.fromJson(original.toJson()); 272 Response response = new Response.fromJson(original.toJson());
273 expect(response.id, equals('myId')); 273 expect(response.id, equals('myId'));
274 Map<String, Object> result = response.toJson()['result']; 274 Map<String, Object> result = response.toJson()['result'];
275 expect(result.length, equals(1)); 275 expect(result.length, equals(1));
276 expect(result['foo'], equals('bar')); 276 expect(result['foo'], equals('bar'));
277 } 277 }
278 } 278 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698