| 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.computer.element; | 5 library test.computer.element; |
| 6 | 6 |
| 7 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/constants.dart'; | 9 import 'package:analysis_server/src/constants.dart'; |
| 10 import 'package:analysis_server/src/protocol_server.dart'; | 10 import 'package:analysis_server/src/protocol_server.dart'; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 new AnalysisErrorType(engineErrorType.name)); | 129 new AnalysisErrorType(engineErrorType.name)); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void test_ElementKind() { | 132 void test_ElementKind() { |
| 133 new EnumTester<engine.ElementKind, ElementKind>() | 133 new EnumTester<engine.ElementKind, ElementKind>() |
| 134 .run(convertElementKind, exceptions: { | 134 .run(convertElementKind, exceptions: { |
| 135 // TODO(paulberry): do any of the exceptions below constitute bugs? | 135 // TODO(paulberry): do any of the exceptions below constitute bugs? |
| 136 engine.ElementKind.DYNAMIC: ElementKind.UNKNOWN, | 136 engine.ElementKind.DYNAMIC: ElementKind.UNKNOWN, |
| 137 engine.ElementKind.ERROR: ElementKind.UNKNOWN, | 137 engine.ElementKind.ERROR: ElementKind.UNKNOWN, |
| 138 engine.ElementKind.EXPORT: ElementKind.UNKNOWN, | 138 engine.ElementKind.EXPORT: ElementKind.UNKNOWN, |
| 139 engine.ElementKind.GENERIC_FUNCTION_TYPE: ElementKind.UNKNOWN, |
| 139 engine.ElementKind.IMPORT: ElementKind.UNKNOWN, | 140 engine.ElementKind.IMPORT: ElementKind.UNKNOWN, |
| 140 engine.ElementKind.NAME: ElementKind.UNKNOWN, | 141 engine.ElementKind.NAME: ElementKind.UNKNOWN, |
| 141 engine.ElementKind.UNIVERSE: ElementKind.UNKNOWN | 142 engine.ElementKind.UNIVERSE: ElementKind.UNKNOWN |
| 142 }); | 143 }); |
| 143 } | 144 } |
| 144 | 145 |
| 145 void test_SearchResultKind() { | 146 void test_SearchResultKind() { |
| 146 // TODO(paulberry): why does the MatchKind class exist at all? Can't we | 147 // TODO(paulberry): why does the MatchKind class exist at all? Can't we |
| 147 // use SearchResultKind inside the analysis server? | 148 // use SearchResultKind inside the analysis server? |
| 148 new EnumTester<MatchKind, SearchResultKind>() | 149 new EnumTester<MatchKind, SearchResultKind>() |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 ApiEnum apiValue = convert(engineValue); | 188 ApiEnum apiValue = convert(engineValue); |
| 188 expect(apiValue, equals(expectedResult)); | 189 expect(apiValue, equals(expectedResult)); |
| 189 } | 190 } |
| 190 } else { | 191 } else { |
| 191 ApiEnum apiValue = convert(engineValue); | 192 ApiEnum apiValue = convert(engineValue); |
| 192 expect(apiValue.name, equals(enumName)); | 193 expect(apiValue.name, equals(enumName)); |
| 193 } | 194 } |
| 194 }); | 195 }); |
| 195 } | 196 } |
| 196 } | 197 } |
| OLD | NEW |