| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library test.services.completion.dart.keyword; | 5 library test.services.completion.dart.keyword; |
| 6 | 6 |
| 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 8 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 8 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
| 9 import 'package:analysis_server/src/services/completion/dart/keyword_contributor
.dart'; | 9 import 'package:analysis_server/src/services/completion/dart/keyword_contributor
.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| 11 import 'package:test/test.dart'; |
| 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 12 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 12 import 'package:unittest/unittest.dart'; | |
| 13 | 13 |
| 14 import '../../../utils.dart'; | 14 import '../../../utils.dart'; |
| 15 import 'completion_contributor_util.dart'; | 15 import 'completion_contributor_util.dart'; |
| 16 | 16 |
| 17 main() { | 17 main() { |
| 18 initializeTestEnvironment(); | 18 initializeTestEnvironment(); |
| 19 defineReflectiveTests(KeywordContributorTest); | 19 defineReflectiveSuite(() { |
| 20 defineReflectiveTests(KeywordContributorTest); |
| 21 }); |
| 20 } | 22 } |
| 21 | 23 |
| 22 @reflectiveTest | 24 @reflectiveTest |
| 23 class KeywordContributorTest extends DartCompletionContributorTest { | 25 class KeywordContributorTest extends DartCompletionContributorTest { |
| 24 static const List<Keyword> CLASS_BODY_KEYWORDS = const [ | 26 static const List<Keyword> CLASS_BODY_KEYWORDS = const [ |
| 25 Keyword.CONST, | 27 Keyword.CONST, |
| 26 Keyword.DYNAMIC, | 28 Keyword.DYNAMIC, |
| 27 Keyword.FACTORY, | 29 Keyword.FACTORY, |
| 28 Keyword.FINAL, | 30 Keyword.FINAL, |
| 29 Keyword.GET, | 31 Keyword.GET, |
| (...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 (c) => msg.writeln(' $c, ${other.contains(c) ? '' : '<<<<<<<<<<<'}')); | 1582 (c) => msg.writeln(' $c, ${other.contains(c) ? '' : '<<<<<<<<<<<'}')); |
| 1581 } | 1583 } |
| 1582 | 1584 |
| 1583 bool _equalSets(Iterable<String> iter1, Iterable<String> iter2) { | 1585 bool _equalSets(Iterable<String> iter1, Iterable<String> iter2) { |
| 1584 if (iter1.length != iter2.length) return false; | 1586 if (iter1.length != iter2.length) return false; |
| 1585 if (iter1.any((c) => !iter2.contains(c))) return false; | 1587 if (iter1.any((c) => !iter2.contains(c))) return false; |
| 1586 if (iter2.any((c) => !iter1.contains(c))) return false; | 1588 if (iter2.any((c) => !iter1.contains(c))) return false; |
| 1587 return true; | 1589 return true; |
| 1588 } | 1590 } |
| 1589 } | 1591 } |
| OLD | NEW |