| 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/src/protocol.dart'; | 7 import 'package:analysis_server/src/protocol.dart'; |
| 8 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 8 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| 9 import 'package:analysis_server/src/services/completion/keyword_computer.dart'; | 9 import 'package:analysis_server/src/services/completion/keyword_contributor.dart
'; |
| 10 import 'package:analyzer/src/generated/scanner.dart'; | 10 import 'package:analyzer/src/generated/scanner.dart'; |
| 11 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
| 12 | 12 |
| 13 import '../../reflective_tests.dart'; | 13 import '../../reflective_tests.dart'; |
| 14 import 'completion_test_util.dart'; | 14 import 'completion_test_util.dart'; |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 groupSep = ' | '; | 17 groupSep = ' | '; |
| 18 runReflectiveTests(KeywordContributorTest); | 18 runReflectiveTests(KeywordContributorTest); |
| 19 } | 19 } |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 sorted.forEach((k) => msg.writeln(' Keyword.${k.name},')); | 456 sorted.forEach((k) => msg.writeln(' Keyword.${k.name},')); |
| 457 } | 457 } |
| 458 | 458 |
| 459 bool _equalSets(Iterable<Keyword> iter1, Iterable<Keyword> iter2) { | 459 bool _equalSets(Iterable<Keyword> iter1, Iterable<Keyword> iter2) { |
| 460 if (iter1.length != iter2.length) return false; | 460 if (iter1.length != iter2.length) return false; |
| 461 if (iter1.any((k) => !iter2.contains(k))) return false; | 461 if (iter1.any((k) => !iter2.contains(k))) return false; |
| 462 if (iter2.any((k) => !iter1.contains(k))) return false; | 462 if (iter2.any((k) => !iter1.contains(k))) return false; |
| 463 return true; | 463 return true; |
| 464 } | 464 } |
| 465 } | 465 } |
| OLD | NEW |