| 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.analysis.notification.navigation; | 5 library test.analysis.notification.navigation; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 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.dart'; | 10 import 'package:analysis_server/src/protocol.dart'; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 class AAA { | 226 class AAA { |
| 227 int fff = 123; | 227 int fff = 123; |
| 228 AAA(this.fff); | 228 AAA(this.fff); |
| 229 } | 229 } |
| 230 '''); | 230 '''); |
| 231 return prepareNavigation().then((_) { | 231 return prepareNavigation().then((_) { |
| 232 assertHasRegionTarget('fff);', 'fff = 123'); | 232 assertHasRegionTarget('fff);', 'fff = 123'); |
| 233 }); | 233 }); |
| 234 } | 234 } |
| 235 | 235 |
| 236 test_fieldFormalParameter_unresolved() { |
| 237 addTestFile(''' |
| 238 class AAA { |
| 239 AAA(this.fff); |
| 240 } |
| 241 '''); |
| 242 return prepareNavigation().then((_) { |
| 243 assertNoRegion('fff);', 3); |
| 244 }); |
| 245 } |
| 246 |
| 236 test_identifier_resolved() { | 247 test_identifier_resolved() { |
| 237 addTestFile(''' | 248 addTestFile(''' |
| 238 class AAA {} | 249 class AAA {} |
| 239 main() { | 250 main() { |
| 240 AAA aaa = null; | 251 AAA aaa = null; |
| 241 print(aaa); | 252 print(aaa); |
| 242 } | 253 } |
| 243 '''); | 254 '''); |
| 244 return prepareNavigation().then((_) { | 255 return prepareNavigation().then((_) { |
| 245 assertHasRegionTarget('AAA aaa', 'AAA {}'); | 256 assertHasRegionTarget('AAA aaa', 'AAA {}'); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 test_type_void() { | 498 test_type_void() { |
| 488 addTestFile(''' | 499 addTestFile(''' |
| 489 void main() { | 500 void main() { |
| 490 } | 501 } |
| 491 '''); | 502 '''); |
| 492 return prepareNavigation().then((_) { | 503 return prepareNavigation().then((_) { |
| 493 assertNoRegionAt('void'); | 504 assertNoRegionAt('void'); |
| 494 }); | 505 }); |
| 495 } | 506 } |
| 496 } | 507 } |
| OLD | NEW |