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

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

Issue 2879273002: Make server use the common protocol classes (Closed)
Patch Set: Created 3 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: pkg/analysis_server/test/protocol_server_test.dart
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index 7593ca557b79d41fca96907e506d1bed76dd974f..fc2c660d04c67ab7dedd00d90c15129d3f8528ad 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library test.computer.element;
-
import 'dart:mirrors';
import 'package:analysis_server/src/constants.dart';
@@ -15,6 +13,7 @@ import 'package:analyzer/dart/element/type.dart' as engine;
import 'package:analyzer/error/error.dart' as engine;
import 'package:analyzer/src/error/codes.dart' as engine;
import 'package:analyzer/src/generated/source.dart' as engine;
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'package:typed_mock/typed_mock.dart';
@@ -155,7 +154,7 @@ class EnumTest {
* Helper class for testing the correspondence between an analysis engine enum
* and an analysis server API enum.
*/
-class EnumTester<EngineEnum, ApiEnum extends Enum> {
+class EnumTester<EngineEnum, ApiEnum> {
/**
* Test that the function [convert] properly converts all possible values of
* [EngineEnum] to an [ApiEnum] with the same name, with the exceptions noted
@@ -190,7 +189,7 @@ class EnumTester<EngineEnum, ApiEnum extends Enum> {
}
} else {
ApiEnum apiValue = convert(engineValue);
- expect(apiValue.name, equals(enumName));
+ expect((apiValue as dynamic).name, equals(enumName));
}
});
}

Powered by Google App Engine
This is Rietveld 408576698