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

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

Issue 1852113002: More strong mode changes in analysis_server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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) 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/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/constants.dart'; 10 import 'package:analysis_server/src/constants.dart';
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 expect(response.error, isNotNull); 259 expect(response.error, isNotNull);
260 RequestError error = response.error; 260 RequestError error = response.error;
261 expect(error.code, equals(RequestErrorCode.INVALID_REQUEST)); 261 expect(error.code, equals(RequestErrorCode.INVALID_REQUEST));
262 expect(error.message, equals('Invalid request')); 262 expect(error.message, equals('Invalid request'));
263 } 263 }
264 264
265 void test_fromJson_withResult() { 265 void test_fromJson_withResult() {
266 Response original = new Response('myId', result: {'foo': 'bar'}); 266 Response original = new Response('myId', result: {'foo': 'bar'});
267 Response response = new Response.fromJson(original.toJson()); 267 Response response = new Response.fromJson(original.toJson());
268 expect(response.id, equals('myId')); 268 expect(response.id, equals('myId'));
269 Map<String, Object> result = response.toJson()['result']; 269 Map<String, Object> result =
270 response.toJson()['result'] as Map<String, Object>;
270 expect(result.length, equals(1)); 271 expect(result.length, equals(1));
271 expect(result['foo'], equals('bar')); 272 expect(result['foo'], equals('bar'));
272 } 273 }
273 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698