| 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.domain.analysis.notification.navigation; | 5 library test.domain.analysis.notification.navigation; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/analysis_server.dart'; | 9 import 'package:analysis_server/src/analysis_server.dart'; |
| 10 import 'package:analysis_server/src/computer/element.dart'; | 10 import 'package:analysis_server/src/computer/element.dart'; |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 print(aaa); | 256 print(aaa); |
| 257 } | 257 } |
| 258 '''); | 258 '''); |
| 259 return prepareNavigation().then((_) { | 259 return prepareNavigation().then((_) { |
| 260 assertHasRegionTarget('AAA aaa', 'AAA {}'); | 260 assertHasRegionTarget('AAA aaa', 'AAA {}'); |
| 261 assertHasRegionTarget('aaa);', 'aaa = null'); | 261 assertHasRegionTarget('aaa);', 'aaa = null'); |
| 262 assertHasRegionTarget('main() {', 'main() {'); | 262 assertHasRegionTarget('main() {', 'main() {'); |
| 263 }); | 263 }); |
| 264 } | 264 } |
| 265 | 265 |
| 266 test_dynamic() { |
| 267 addTestFile(''' |
| 268 main() { |
| 269 dynamic v = null; |
| 270 } |
| 271 '''); |
| 272 return prepareNavigation().then((_) { |
| 273 assertNoRegionAt('dynamic'); |
| 274 }); |
| 275 } |
| 276 |
| 266 test_identifier_unresolved() { | 277 test_identifier_unresolved() { |
| 267 addTestFile(''' | 278 addTestFile(''' |
| 268 main() { | 279 main() { |
| 269 print(vvv); | 280 print(vvv); |
| 270 } | 281 } |
| 271 '''); | 282 '''); |
| 272 return prepareNavigation().then((_) { | 283 return prepareNavigation().then((_) { |
| 273 assertNoRegionString('vvv'); | 284 assertNoRegionString('vvv'); |
| 274 }); | 285 }); |
| 275 } | 286 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 final int length; | 490 final int length; |
| 480 final List<Element> targets; | 491 final List<Element> targets; |
| 481 | 492 |
| 482 NavigationRegion(this.offset, this.length, this.targets); | 493 NavigationRegion(this.offset, this.length, this.targets); |
| 483 | 494 |
| 484 @override | 495 @override |
| 485 String toString() { | 496 String toString() { |
| 486 return 'NavigationRegion(offset=$offset; length=$length; targets=$targets'; | 497 return 'NavigationRegion(offset=$offset; length=$length; targets=$targets'; |
| 487 } | 498 } |
| 488 } | 499 } |
| OLD | NEW |