| Index: pkg/analysis_server/test/computer/element_test.dart
|
| diff --git a/pkg/analysis_server/test/computer/element_test.dart b/pkg/analysis_server/test/computer/element_test.dart
|
| index ddabed7c11d823a4750d2766d91d84127c27604c..45cbbf5b85c1e1daed2cd0889c8c1697e7639015 100644
|
| --- a/pkg/analysis_server/test/computer/element_test.dart
|
| +++ b/pkg/analysis_server/test/computer/element_test.dart
|
| @@ -4,9 +4,7 @@
|
|
|
| library test.computer.element;
|
|
|
| -import 'package:analysis_server/src/computer/element.dart';
|
| -import 'package:analysis_server/src/constants.dart';
|
| -import 'package:analysis_server/src/protocol2.dart' show ElementKind;
|
| +import 'package:analysis_server/src/protocol2.dart';
|
| import 'package:analysis_testing/abstract_context.dart';
|
| import 'package:analysis_testing/reflective_tests.dart';
|
| import 'package:analyzer/src/generated/ast.dart';
|
| @@ -256,64 +254,4 @@ class A {
|
| expect(element.returnType, 'List<String>');
|
| expect(element.flags, Element.FLAG_STATIC);
|
| }
|
| -
|
| - void test_fromJson() {
|
| - var flags =
|
| - Element.FLAG_DEPRECATED |
|
| - Element.FLAG_PRIVATE |
|
| - Element.FLAG_STATIC;
|
| - var json = {
|
| - KIND: 'METHOD',
|
| - NAME: 'my name',
|
| - LOCATION: {
|
| - FILE: '/project/file.dart',
|
| - OFFSET: 1,
|
| - LENGTH: 2,
|
| - START_LINE: 3,
|
| - START_COLUMN: 4,
|
| - },
|
| - FLAGS: flags,
|
| - PARAMETERS: '(int a, String b)',
|
| - RETURN_TYPE: 'List<String>'
|
| - };
|
| - Element element = new Element.fromJson(json);
|
| - expect(element.kind, ElementKind.METHOD);
|
| - expect(element.name, 'my name');
|
| - {
|
| - Location location = element.location;
|
| - expect(location.file, '/project/file.dart');
|
| - expect(location.offset, 1);
|
| - expect(location.length, 2);
|
| - expect(location.startLine, 3);
|
| - expect(location.startColumn, 4);
|
| - }
|
| - expect(element.flags, flags);
|
| - expect(element.isAbstract, isFalse);
|
| - expect(element.isConst, isFalse);
|
| - expect(element.isDeprecated, isTrue);
|
| - expect(element.isFinal, isFalse);
|
| - expect(element.isPrivate, isTrue);
|
| - expect(element.isStatic, isTrue);
|
| - }
|
| -
|
| - void test_toJson() {
|
| - var json = {
|
| - KIND: 'METHOD',
|
| - NAME: 'my name',
|
| - LOCATION: {
|
| - FILE: '/project/file.dart',
|
| - OFFSET: 1,
|
| - LENGTH: 2,
|
| - START_LINE: 3,
|
| - START_COLUMN: 4,
|
| - },
|
| - FLAGS: Element.FLAG_DEPRECATED |
|
| - Element.FLAG_PRIVATE |
|
| - Element.FLAG_STATIC,
|
| - PARAMETERS: '(int a, String b)',
|
| - RETURN_TYPE: 'List<String>'
|
| - };
|
| - Element element = new Element.fromJson(json);
|
| - expect(element.toJson(), equals(json));
|
| - }
|
| }
|
|
|