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

Unified Diff: editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java

Issue 300313002: Switch to using remote analysis server instead of local. (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
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() {

Powered by Google App Engine
This is Rietveld 408576698