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

Unified Diff: pkg/analysis_services/test/completion/keyword_computer_test.dart

Issue 484733003: Import analysis_services.dart into analysis_server.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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_services/test/completion/keyword_computer_test.dart
diff --git a/pkg/analysis_services/test/completion/keyword_computer_test.dart b/pkg/analysis_services/test/completion/keyword_computer_test.dart
deleted file mode 100644
index 49ad8418244fa658a750983a1798197b41023a02..0000000000000000000000000000000000000000
--- a/pkg/analysis_services/test/completion/keyword_computer_test.dart
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// 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.services.completion.dart.keyword;
-
-import 'package:analysis_services/completion/completion_suggestion.dart';
-import 'package:analysis_services/src/completion/keyword_computer.dart';
-import 'package:analysis_testing/reflective_tests.dart';
-import 'package:analyzer/src/generated/scanner.dart';
-import 'package:unittest/unittest.dart';
-
-import 'completion_test_util.dart';
-
-main() {
- groupSep = ' | ';
- runReflectiveTests(KeywordComputerTest);
-}
-
-@ReflectiveTestCase()
-class KeywordComputerTest extends AbstractCompletionTest {
-
- void assertSuggestKeywords(List<String> names) {
- Keyword.values.forEach((Keyword keyword) {
- if (names.contains(keyword.syntax)) {
- assertSuggest(CompletionSuggestionKind.KEYWORD, keyword.syntax);
- } else {
- assertNotSuggested(keyword.syntax);
- }
- });
- }
-
- @override
- void setUp() {
- super.setUp();
- computer = new KeywordComputer();
- }
-
- test_class_extends() {
- addTestSource('class A ^');
- expect(computeFast(), isTrue);
- assertSuggestKeywords(['extends', 'implements', 'with']);
- }
-
- test_class_extends_name() {
- addTestSource('class A extends ^');
- expect(computeFast(), isTrue);
- assertSuggestKeywords([]);
- }
-
- test_class_name() {
- addTestSource('class ^');
- expect(computeFast(), isTrue);
- assertSuggestKeywords([]);
- }
-
- test_empty() {
- addTestSource('^');
- expect(computeFast(), isTrue);
- assertSuggestKeywords(
- [
- 'abstract',
- 'class',
- 'const',
- 'export',
- 'final',
- 'import',
- 'library',
- 'part',
- 'typedef',
- 'var']);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698