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

Unified Diff: pkg/analysis_server/test/analysis_server_test.dart

Issue 291023002: update analysis_server_test with expected error code message arguments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis_server_test.dart
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 659b925f07d35cdb55f2553a2eb6e5365da3cf1e..c946d596b707f8f576d346b5d30b1291bac319d1 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -70,7 +70,7 @@ class AnalysisServerTest {
ChangeNoticeImpl changeNoticeImpl = new ChangeNoticeImpl(source);
LineInfo lineInfo = new LineInfo([0]);
AnalysisError analysisError = new AnalysisError.con1(source,
- CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, []);
+ CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, ['Foo']);
changeNoticeImpl.setErrors([analysisError], lineInfo);
context.when(callsTo('performAnalysisTask')).thenReturn(
new AnalysisResult([changeNoticeImpl], 0, 'myClass', 0));
@@ -142,14 +142,14 @@ class AnalysisServerTest {
CompileTimeErrorCode errorCode =
CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER;
AnalysisError analysisError =
- new AnalysisError.con2(source, 10, 5, errorCode, []);
+ new AnalysisError.con2(source, 10, 5, errorCode, ['Foo']);
Map<String, Object> json = AnalysisServer.errorToJson(analysisError);
expect(json, hasLength(5));
expect(json['source'], equals('foo.dart'));
expect(json['errorCode'], equals(errorCode.ordinal));
expect(json['offset'], equals(analysisError.offset));
expect(json['length'], equals(analysisError.length));
- expect(json['message'], equals(errorCode.message));
+ expect(json['message'], equals(errorCode.message.replaceAll('%s', 'Foo')));
}
static void errorToJson_withCorrection() {
« 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