| 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 import 'package:analysis_server/plugin/protocol/protocol_dart.dart'; | 5 import 'package:analysis_server/plugin/protocol/protocol_dart.dart'; | 
| 6 import 'package:analyzer/dart/ast/ast.dart' as engine; | 6 import 'package:analyzer/dart/ast/ast.dart' as engine; | 
| 7 import 'package:analyzer/dart/ast/visitor.dart' as engine; | 7 import 'package:analyzer/dart/ast/visitor.dart' as engine; | 
| 8 import 'package:analyzer/dart/element/element.dart' as engine; | 8 import 'package:analyzer/dart/element/element.dart' as engine; | 
| 9 import 'package:analyzer/dart/element/type.dart' as engine; | 9 import 'package:analyzer/dart/element/type.dart' as engine; | 
| 10 import 'package:analyzer/error/error.dart' as engine; | 10 import 'package:analyzer/error/error.dart' as engine; | 
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 325     expect(element.name, 'myField'); | 325     expect(element.name, 'myField'); | 
| 326     { | 326     { | 
| 327       Location location = element.location; | 327       Location location = element.location; | 
| 328       expect(location.file, '/test.dart'); | 328       expect(location.file, '/test.dart'); | 
| 329       expect(location.offset, 25); | 329       expect(location.offset, 25); | 
| 330       expect(location.length, 'myField'.length); | 330       expect(location.length, 'myField'.length); | 
| 331       expect(location.startLine, 2); | 331       expect(location.startLine, 2); | 
| 332       expect(location.startColumn, 16); | 332       expect(location.startColumn, 16); | 
| 333     } | 333     } | 
| 334     expect(element.parameters, isNull); | 334     expect(element.parameters, isNull); | 
| 335     expect(element.returnType, 'dynamic'); | 335     expect(element.returnType, 'int'); | 
| 336     expect(element.flags, Element.FLAG_CONST | Element.FLAG_STATIC); | 336     expect(element.flags, Element.FLAG_CONST | Element.FLAG_STATIC); | 
| 337   } | 337   } | 
| 338 | 338 | 
| 339   test_fromElement_FUNCTION_TYPE_ALIAS() async { | 339   test_fromElement_FUNCTION_TYPE_ALIAS() async { | 
| 340     engine.Source source = addSource( | 340     engine.Source source = addSource( | 
| 341         '/test.dart', | 341         '/test.dart', | 
| 342         ''' | 342         ''' | 
| 343 typedef int F<T>(String x); | 343 typedef int F<T>(String x); | 
| 344 '''); | 344 '''); | 
| 345     engine.CompilationUnit unit = await resolveLibraryUnit(source); | 345     engine.CompilationUnit unit = await resolveLibraryUnit(source); | 
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 468       expect(location.offset, 16); | 468       expect(location.offset, 16); | 
| 469       expect(location.length, 'mySetter'.length); | 469       expect(location.length, 'mySetter'.length); | 
| 470       expect(location.startLine, 2); | 470       expect(location.startLine, 2); | 
| 471       expect(location.startColumn, 7); | 471       expect(location.startColumn, 7); | 
| 472     } | 472     } | 
| 473     expect(element.parameters, '(String x)'); | 473     expect(element.parameters, '(String x)'); | 
| 474     expect(element.returnType, isNull); | 474     expect(element.returnType, isNull); | 
| 475     expect(element.flags, 0); | 475     expect(element.flags, 0); | 
| 476   } | 476   } | 
| 477 } | 477 } | 
| OLD | NEW | 
|---|