| Index: editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java b/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
|
| index e57d577b7a19ea8a1b36b98b92e140d39ae4c7b2..bee6c9293052b279ae31a47eda0d9143edb763ae 100644
|
| --- a/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
|
| @@ -13,6 +13,8 @@
|
| */
|
| package com.google.dart.server.internal.remote;
|
|
|
| +import com.google.dart.engine.error.CompileTimeErrorCode;
|
| +import com.google.dart.engine.parser.ParserErrorCode;
|
| import com.google.dart.server.ServerService;
|
| import com.google.dart.server.VersionConsumer;
|
| import com.google.dart.server.internal.integration.RemoteAnalysisServerImplIntegrationTest;
|
| @@ -25,6 +27,40 @@ import java.util.ArrayList;
|
| */
|
| public class RemoteAnalysisServerImplTest extends AbstractRemoteServerTest {
|
|
|
| + public void test_analysis_notification_errors() throws Exception {
|
| + putResponse(//
|
| + "{",
|
| + " 'event': 'analysis.errors',",
|
| + " 'params': {",
|
| + " 'file': '/test.dart',",
|
| + " 'errors' : [",
|
| + " {",
|
| + " 'file': '/the/same/file.dart',",
|
| + " 'errorCode': 'ParserErrorCode.ABSTRACT_CLASS_MEMBER',",
|
| + " 'offset': 1,",
|
| + " 'length': 2,",
|
| + " 'message': 'message A',",
|
| + " 'correction': 'correction A'",
|
| + " },",
|
| + " {",
|
| + " 'file': '/the/same/file.dart',",
|
| + " 'errorCode': 'CompileTimeErrorCode.AMBIGUOUS_EXPORT',",
|
| + " 'offset': 10,",
|
| + " 'length': 20,",
|
| + " 'message': 'message B',",
|
| + " 'correction': 'correction B'",
|
| + " }",
|
| + " ]",
|
| + " }",
|
| + "}");
|
| + responseStream.waitForEmpty();
|
| + server.test_waitForWorkerComplete();
|
| + listener.assertErrorsWithCodes(
|
| + "/test.dart",
|
| + ParserErrorCode.ABSTRACT_CLASS_MEMBER,
|
| + CompileTimeErrorCode.AMBIGUOUS_EXPORT);
|
| + }
|
| +
|
| public void test_getVersion() throws Exception {
|
| final String[] versionPtr = {null};
|
| server.getVersion(new VersionConsumer() {
|
|
|