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.search.search_result; | 5 library test.search.search_result; |
6 | 6 |
7 import 'package:analysis_server/src/protocol_server.dart'; | 7 import 'package:analysis_server/src/protocol_server.dart'; |
8 import 'package:analysis_server/src/services/search/search_engine.dart'; | 8 import 'package:analysis_server/src/services/search/search_engine.dart'; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 | 10 |
11 import '../reflective_tests.dart'; | 11 import '../reflective_tests.dart'; |
12 | 12 |
13 | 13 |
14 main() { | 14 main() { |
15 groupSep = ' | '; | 15 groupSep = ' | '; |
16 runReflectiveTests(SearchResultKindTest); | 16 runReflectiveTests(SearchResultKindTest); |
17 } | 17 } |
18 | 18 |
19 | 19 |
20 @ReflectiveTestCase() | 20 @reflectiveTest |
21 class SearchResultKindTest { | 21 class SearchResultKindTest { |
22 void test_fromEngine() { | 22 void test_fromEngine() { |
23 expect( | 23 expect( |
24 newSearchResultKind_fromEngine(MatchKind.DECLARATION), | 24 newSearchResultKind_fromEngine(MatchKind.DECLARATION), |
25 SearchResultKind.DECLARATION); | 25 SearchResultKind.DECLARATION); |
26 expect( | 26 expect( |
27 newSearchResultKind_fromEngine(MatchKind.READ), | 27 newSearchResultKind_fromEngine(MatchKind.READ), |
28 SearchResultKind.READ); | 28 SearchResultKind.READ); |
29 expect( | 29 expect( |
30 newSearchResultKind_fromEngine(MatchKind.READ_WRITE), | 30 newSearchResultKind_fromEngine(MatchKind.READ_WRITE), |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 new SearchResultKind(SearchResultKind.UNKNOWN.name), | 64 new SearchResultKind(SearchResultKind.UNKNOWN.name), |
65 SearchResultKind.UNKNOWN); | 65 SearchResultKind.UNKNOWN); |
66 } | 66 } |
67 | 67 |
68 void test_toString() { | 68 void test_toString() { |
69 expect( | 69 expect( |
70 SearchResultKind.DECLARATION.toString(), | 70 SearchResultKind.DECLARATION.toString(), |
71 'SearchResultKind.DECLARATION'); | 71 'SearchResultKind.DECLARATION'); |
72 } | 72 } |
73 } | 73 } |
OLD | NEW |