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

Side by Side Diff: pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart

Issue 2844273003: Unify the server and plugin versions of the generators (Closed)
Patch Set: add missed files 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/protocol/protocol_generated.dart';
8 import 'package:analysis_server/src/provisional/edit/utilities/change_builder_co re.dart'; 8 import 'package:analysis_server/src/provisional/edit/utilities/change_builder_co re.dart';
9 import 'package:analysis_server/src/provisional/edit/utilities/change_builder_da rt.dart'; 9 import 'package:analysis_server/src/provisional/edit/utilities/change_builder_da rt.dart';
10 import 'package:analysis_server/src/utilities/change_builder_dart.dart'; 10 import 'package:analysis_server/src/utilities/change_builder_dart.dart';
11 import 'package:analyzer/dart/ast/ast.dart'; 11 import 'package:analyzer/dart/ast/ast.dart';
12 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 12 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
13 import 'package:analyzer/dart/element/element.dart'; 13 import 'package:analyzer/dart/element/element.dart';
14 import 'package:analyzer/dart/element/type.dart'; 14 import 'package:analyzer/dart/element/type.dart';
15 import 'package:analyzer/src/context/source.dart'; 15 import 'package:analyzer/src/context/source.dart';
16 import 'package:analyzer/src/dart/analysis/driver.dart'; 16 import 'package:analyzer/src/dart/analysis/driver.dart';
17 import 'package:analyzer/src/generated/engine.dart'; 17 import 'package:analyzer/src/generated/engine.dart';
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 CompilationUnit unit = (await driver.getResult(path))?.unit; 1204 CompilationUnit unit = (await driver.getResult(path))?.unit;
1205 ClassDeclaration classC = unit.declarations[2]; 1205 ClassDeclaration classC = unit.declarations[2];
1206 DartLinkedEditBuilderImpl builder = new DartLinkedEditBuilderImpl(null); 1206 DartLinkedEditBuilderImpl builder = new DartLinkedEditBuilderImpl(null);
1207 builder.addSuperTypesAsSuggestions(classC.element.type); 1207 builder.addSuperTypesAsSuggestions(classC.element.type);
1208 List<LinkedEditSuggestion> suggestions = builder.suggestions; 1208 List<LinkedEditSuggestion> suggestions = builder.suggestions;
1209 expect(suggestions, hasLength(4)); 1209 expect(suggestions, hasLength(4));
1210 expect(suggestions.map((s) => s.value), 1210 expect(suggestions.map((s) => s.value),
1211 unorderedEquals(['Object', 'A', 'B', 'C'])); 1211 unorderedEquals(['Object', 'A', 'B', 'C']));
1212 } 1212 }
1213 } 1213 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698