| 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 analyzer.test.generated.all_the_rest_test; | 5 library analyzer.test.generated.all_the_rest_test; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/element/element.dart'; | 7 import 'package:analyzer/dart/element/element.dart'; |
| 8 import 'package:analyzer/dart/element/type.dart'; | 8 import 'package:analyzer/dart/element/type.dart'; |
| 9 import 'package:analyzer/file_system/physical_file_system.dart'; | 9 import 'package:analyzer/file_system/physical_file_system.dart'; |
| 10 import 'package:analyzer/src/dart/element/element.dart'; | 10 import 'package:analyzer/src/dart/element/element.dart'; |
| (...skipping 6338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6349 expect(variable.name, variableName); | 6349 expect(variable.name, variableName); |
| 6350 expect(variable.isConst, isFalse); | 6350 expect(variable.isConst, isFalse); |
| 6351 expect(variable.isFinal, isTrue); | 6351 expect(variable.isFinal, isTrue); |
| 6352 expect(variable.isSynthetic, isFalse); | 6352 expect(variable.isSynthetic, isFalse); |
| 6353 expect(variable.getter, isNotNull); | 6353 expect(variable.getter, isNotNull); |
| 6354 expect(variable.setter, isNull); | 6354 expect(variable.setter, isNull); |
| 6355 } | 6355 } |
| 6356 | 6356 |
| 6357 void _assertHasDocRange( | 6357 void _assertHasDocRange( |
| 6358 Element element, int expectedOffset, int expectedLength) { | 6358 Element element, int expectedOffset, int expectedLength) { |
| 6359 SourceRange docRange = element.docRange; | 6359 // Cast to dynamic here to avoid a hint about @deprecated docRange. |
| 6360 SourceRange docRange = (element as dynamic).docRange; |
| 6360 expect(docRange, isNotNull); | 6361 expect(docRange, isNotNull); |
| 6361 expect(docRange.offset, expectedOffset); | 6362 expect(docRange.offset, expectedOffset); |
| 6362 expect(docRange.length, expectedLength); | 6363 expect(docRange.length, expectedLength); |
| 6363 } | 6364 } |
| 6364 | 6365 |
| 6365 void _useParameterInMethod( | 6366 void _useParameterInMethod( |
| 6366 FormalParameter formalParameter, int blockOffset, int blockEnd) { | 6367 FormalParameter formalParameter, int blockOffset, int blockEnd) { |
| 6367 Block block = AstFactory.block(); | 6368 Block block = AstFactory.block(); |
| 6368 block.leftBracket.offset = blockOffset; | 6369 block.leftBracket.offset = blockOffset; |
| 6369 block.rightBracket.offset = blockEnd - 1; | 6370 block.rightBracket.offset = blockEnd - 1; |
| (...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8244 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); | 8245 expect(UriKind.fromEncoding(0x70), same(UriKind.PACKAGE_URI)); |
| 8245 expect(UriKind.fromEncoding(0x58), same(null)); | 8246 expect(UriKind.fromEncoding(0x58), same(null)); |
| 8246 } | 8247 } |
| 8247 | 8248 |
| 8248 void test_getEncoding() { | 8249 void test_getEncoding() { |
| 8249 expect(UriKind.DART_URI.encoding, 0x64); | 8250 expect(UriKind.DART_URI.encoding, 0x64); |
| 8250 expect(UriKind.FILE_URI.encoding, 0x66); | 8251 expect(UriKind.FILE_URI.encoding, 0x66); |
| 8251 expect(UriKind.PACKAGE_URI.encoding, 0x70); | 8252 expect(UriKind.PACKAGE_URI.encoding, 0x70); |
| 8252 } | 8253 } |
| 8253 } | 8254 } |
| OLD | NEW |