| 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.services.completion.util; | 5 library test.services.completion.util; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, | 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, |
| 10 ElementKind; | 10 ElementKind; |
| (...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1990 CompletionSuggestion methodA = assertSuggestLocalMethod('_a', 'A', 'Z'); | 1990 CompletionSuggestion methodA = assertSuggestLocalMethod('_a', 'A', 'Z'); |
| 1991 if (methodA != null) { | 1991 if (methodA != null) { |
| 1992 expect(methodA.element.isDeprecated, isFalse); | 1992 expect(methodA.element.isDeprecated, isFalse); |
| 1993 expect(methodA.element.isPrivate, isTrue); | 1993 expect(methodA.element.isPrivate, isTrue); |
| 1994 } | 1994 } |
| 1995 CompletionSuggestion getterF = | 1995 CompletionSuggestion getterF = |
| 1996 assertSuggestLocalGetter('f', 'X', CompletionRelevance.LOW); | 1996 assertSuggestLocalGetter('f', 'X', CompletionRelevance.LOW); |
| 1997 if (getterF != null) { | 1997 if (getterF != null) { |
| 1998 expect(getterF.element.isDeprecated, isTrue); | 1998 expect(getterF.element.isDeprecated, isTrue); |
| 1999 expect(getterF.element.isPrivate, isFalse); | 1999 expect(getterF.element.isPrivate, isFalse); |
| 2000 expect(getterF.element.parameters, isNull); |
| 2000 } | 2001 } |
| 2001 CompletionSuggestion getterG = assertSuggestLocalGetter('_g', null); | 2002 CompletionSuggestion getterG = assertSuggestLocalGetter('_g', null); |
| 2002 if (getterG != null) { | 2003 if (getterG != null) { |
| 2003 expect(getterG.element.isDeprecated, isFalse); | 2004 expect(getterG.element.isDeprecated, isFalse); |
| 2004 expect(getterG.element.isPrivate, isTrue); | 2005 expect(getterG.element.isPrivate, isTrue); |
| 2006 expect(getterF.element.parameters, isNull); |
| 2005 } | 2007 } |
| 2006 assertSuggestImportedClass('bool'); | 2008 assertSuggestImportedClass('bool'); |
| 2007 }); | 2009 }); |
| 2008 } | 2010 } |
| 2009 | 2011 |
| 2010 test_MethodDeclaration_parameters_named() { | 2012 test_MethodDeclaration_parameters_named() { |
| 2011 // Block BlockFunctionBody MethodDeclaration | 2013 // Block BlockFunctionBody MethodDeclaration |
| 2012 addTestSource('class A {@deprecated Z a(X x, _, b, {y: boo}) {^}}'); | 2014 addTestSource('class A {@deprecated Z a(X x, _, b, {y: boo}) {^}}'); |
| 2013 computeFast(); | 2015 computeFast(); |
| 2014 return computeFull((bool result) { | 2016 return computeFull((bool result) { |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2514 assertNotSuggested('bar2'); | 2516 assertNotSuggested('bar2'); |
| 2515 assertNotSuggested('_B'); | 2517 assertNotSuggested('_B'); |
| 2516 assertSuggestLocalClass('Y'); | 2518 assertSuggestLocalClass('Y'); |
| 2517 assertSuggestLocalClass('C'); | 2519 assertSuggestLocalClass('C'); |
| 2518 assertSuggestLocalVariable('f', null); | 2520 assertSuggestLocalVariable('f', null); |
| 2519 assertNotSuggested('x'); | 2521 assertNotSuggested('x'); |
| 2520 assertNotSuggested('e'); | 2522 assertNotSuggested('e'); |
| 2521 }); | 2523 }); |
| 2522 } | 2524 } |
| 2523 } | 2525 } |
| OLD | NEW |