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

Unified Diff: pkg/analysis_server/test/integration/integration_tests.dart

Issue 1241193002: Add '--useAnalysisHighlight2' option to generate version 2 of semantic highlight. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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: pkg/analysis_server/test/integration/integration_tests.dart
diff --git a/pkg/analysis_server/test/integration/integration_tests.dart b/pkg/analysis_server/test/integration/integration_tests.dart
index faec89f54533e1c500ea54402bdb33ddae75d38d..f46b3387c04b20315b421bceba7b2a815f7b5f8d 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -21,9 +21,9 @@ const Matcher isBool = const isInstanceOf<bool>('bool');
const Matcher isInt = const isInstanceOf<int>('int');
-const Matcher isNotification = const MatchesJsonObject('notification', const {
- 'event': isString
-}, optionalFields: const {'params': isMap});
+const Matcher isNotification = const MatchesJsonObject(
+ 'notification', const {'event': isString},
+ optionalFields: const {'params': isMap});
const Matcher isObject = isMap;
@@ -154,7 +154,7 @@ abstract class AbstractAnalysisServerIntegrationTest
// A server error should never happen during an integration test.
fail('${params.message}\n${params.stackTrace}');
});
- return server.start().then((_) {
+ return startServer().then((_) {
server.listenToOutput(dispatchNotification);
server.exitCode.then((_) {
skipShutdown = true;
@@ -188,6 +188,11 @@ abstract class AbstractAnalysisServerIntegrationTest
}
/**
+ * Start [server].
+ */
+ Future startServer() => server.start();
+
+ /**
* After every test, the server is stopped and [sourceDirectory] is deleted.
*/
Future tearDown() {
@@ -584,7 +589,8 @@ class Server {
* `true`, the server will be started with "--observe" and
* "--pause-isolates-on-exit", allowing the observatory to be used.
*/
- Future start({bool debugServer: false, int diagnosticPort, bool profileServer: false}) {
+ Future start({bool debugServer: false, int diagnosticPort,
+ bool profileServer: false, bool useAnalysisHighlight2: false}) {
if (_process != null) {
throw new Exception('Process already started');
}
@@ -610,6 +616,9 @@ class Server {
arguments.add('--port');
arguments.add(diagnosticPort.toString());
}
+ if (useAnalysisHighlight2) {
+ arguments.add('--useAnalysisHighlight2');
+ }
return Process.start(dartBinary, arguments).then((Process process) {
_process = process;
process.exitCode.then((int code) {

Powered by Google App Engine
This is Rietveld 408576698