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

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

Issue 308313005: (TBR) Fix the build (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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.analysis_server; 5 library test.analysis_server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 test('errorToJson_formattingApplied', () { 83 test('errorToJson_formattingApplied', () {
84 MockSource source = new MockSource(); 84 MockSource source = new MockSource();
85 source.when(callsTo('get encoding')).alwaysReturn('foo.dart'); 85 source.when(callsTo('get encoding')).alwaysReturn('foo.dart');
86 CompileTimeErrorCode errorCode = CompileTimeErrorCode.AMBIGUOUS_EXPORT; 86 CompileTimeErrorCode errorCode = CompileTimeErrorCode.AMBIGUOUS_EXPORT;
87 AnalysisError analysisError = 87 AnalysisError analysisError =
88 new AnalysisError.con1(source, errorCode, ['foo', 'bar', 'baz']); 88 new AnalysisError.con1(source, errorCode, ['foo', 'bar', 'baz']);
89 Map<String, Object> json = AnalysisServer.errorToJson(analysisError); 89 Map<String, Object> json = AnalysisServer.errorToJson(analysisError);
90 90
91 expect(json['message'], 91 expect(json['message'],
92 equals("The element 'foo' is defined in the libraries 'bar' and 'baz'" )); 92 equals("The name 'foo' is defined in the libraries 'bar' and 'baz'"));
93 }); 93 });
94 94
95 test('errorToJson_noCorrection', () { 95 test('errorToJson_noCorrection', () {
96 MockSource source = new MockSource(); 96 MockSource source = new MockSource();
97 source.when(callsTo('get fullName')).alwaysReturn('foo.dart'); 97 source.when(callsTo('get fullName')).alwaysReturn('foo.dart');
98 CompileTimeErrorCode errorCode = 98 CompileTimeErrorCode errorCode =
99 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER; 99 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER;
100 AnalysisError analysisError = 100 AnalysisError analysisError =
101 new AnalysisError.con2(source, 10, 5, errorCode, ['Foo']); 101 new AnalysisError.con2(source, 10, 5, errorCode, ['Foo']);
102 Map<String, Object> json = AnalysisServer.errorToJson(analysisError); 102 Map<String, Object> json = AnalysisServer.errorToJson(analysisError);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 @override 164 @override
165 Response handleRequest(Request request) { 165 Response handleRequest(Request request) {
166 if (request.method == 'echo') { 166 if (request.method == 'echo') {
167 var response = new Response(request.id); 167 var response = new Response(request.id);
168 response.setResult('echo', true); 168 response.setResult('echo', true);
169 return response; 169 return response;
170 } 170 }
171 return null; 171 return null;
172 } 172 }
173 } 173 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698