Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Side by Side Diff: pkg/analysis_server/test/search/member_declarations_test.dart

Issue 2884593003: Reverse the sense of the flag to make it easier to find test that need to be converted (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/protocol/protocol.dart'; 7 import 'package:analysis_server/protocol/protocol.dart';
8 import 'package:analysis_server/protocol/protocol_generated.dart'; 8 import 'package:analysis_server/protocol/protocol_generated.dart';
9 import 'package:test/test.dart'; 9 import 'package:test/test.dart';
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; 10 import 'package:test_reflective_loader/test_reflective_loader.dart';
(...skipping 29 matching lines...) Expand all
40 for (SearchResult result in results) { 40 for (SearchResult result in results) {
41 Element element = result.path[0]; 41 Element element = result.path[0];
42 Element clazz = result.path[1]; 42 Element clazz = result.path[1];
43 if (element.kind == kind && clazz.name == enclosingClass) { 43 if (element.kind == kind && clazz.name == enclosingClass) {
44 return result; 44 return result;
45 } 45 }
46 } 46 }
47 return null; 47 return null;
48 } 48 }
49 49
50 @override
51 void setUp() {
52 enableNewAnalysisDriver = true;
53 super.setUp();
54 }
55
56 test_localVariable() async { 50 test_localVariable() async {
57 addTestFile(''' 51 addTestFile('''
58 class A { 52 class A {
59 main() { 53 main() {
60 var foo = 42; 54 var foo = 42;
61 } 55 }
62 } 56 }
63 '''); 57 ''');
64 await findMemberDeclarations('foo'); 58 await findMemberDeclarations('foo');
65 expect(results, isEmpty); 59 expect(results, isEmpty);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 class B { 147 class B {
154 set foo(x) {} 148 set foo(x) {}
155 } 149 }
156 '''); 150 ''');
157 await findMemberDeclarations('foo'); 151 await findMemberDeclarations('foo');
158 expect(results, hasLength(2)); 152 expect(results, hasLength(2));
159 assertHasDeclaration(ElementKind.METHOD, 'A'); 153 assertHasDeclaration(ElementKind.METHOD, 'A');
160 assertHasDeclaration(ElementKind.SETTER, 'B'); 154 assertHasDeclaration(ElementKind.SETTER, 'B');
161 } 155 }
162 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698