| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 expect(element.kind, ElementKind.GETTER); | 323 expect(element.kind, ElementKind.GETTER); |
| 324 expect(element.name, 'myGetter'); | 324 expect(element.name, 'myGetter'); |
| 325 { | 325 { |
| 326 Location location = element.location; | 326 Location location = element.location; |
| 327 expect(location.file, '/test.dart'); | 327 expect(location.file, '/test.dart'); |
| 328 expect(location.offset, 23); | 328 expect(location.offset, 23); |
| 329 expect(location.length, 'myGetter'.length); | 329 expect(location.length, 'myGetter'.length); |
| 330 expect(location.startLine, 2); | 330 expect(location.startLine, 2); |
| 331 expect(location.startColumn, 14); | 331 expect(location.startColumn, 14); |
| 332 } | 332 } |
| 333 expect(element.parameters, '()'); | 333 expect(element.parameters, isNull); |
| 334 expect(element.returnType, 'String'); | 334 expect(element.returnType, 'String'); |
| 335 expect(element.flags, 0); | 335 expect(element.flags, 0); |
| 336 } | 336 } |
| 337 | 337 |
| 338 void test_fromElement_LABEL() { | 338 void test_fromElement_LABEL() { |
| 339 engine.Source source = addSource('/test.dart', ''' | 339 engine.Source source = addSource('/test.dart', ''' |
| 340 main() { | 340 main() { |
| 341 myLabel: | 341 myLabel: |
| 342 while (true) { | 342 while (true) { |
| 343 break myLabel; | 343 break myLabel; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 ApiEnum apiValue = convert(engineValue); | 510 ApiEnum apiValue = convert(engineValue); |
| 511 expect(apiValue, equals(expectedResult)); | 511 expect(apiValue, equals(expectedResult)); |
| 512 } | 512 } |
| 513 } else { | 513 } else { |
| 514 ApiEnum apiValue = convert(engineValue); | 514 ApiEnum apiValue = convert(engineValue); |
| 515 expect(apiValue.name, equals(enumName)); | 515 expect(apiValue.name, equals(enumName)); |
| 516 } | 516 } |
| 517 }); | 517 }); |
| 518 } | 518 } |
| 519 } | 519 } |
| OLD | NEW |