| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 library lib; | 439 library lib; |
| 440 part "test_unit.dart"; | 440 part "test_unit.dart"; |
| 441 '''); | 441 '''); |
| 442 return prepareNavigation(() { | 442 return prepareNavigation(() { |
| 443 assertHasRegionString('part "test_unit.dart"'); | 443 assertHasRegionString('part "test_unit.dart"'); |
| 444 assertHasFileTarget(unitFile, 0, 0); | 444 assertHasFileTarget(unitFile, 0, 0); |
| 445 }); | 445 }); |
| 446 } | 446 } |
| 447 | 447 |
| 448 test_string_part_unresolvedUri() { | 448 test_string_part_unresolvedUri() { |
| 449 // TODO(scheglov) why do we throw MemoryResourceException here? | 449 addTestFile(''' |
| 450 // This Source/File does not exist. | 450 library lib; |
| 451 // addTestFile(''' | 451 part "test_unit.dart"; |
| 452 //library lib; | 452 '''); |
| 453 //part "test_unit.dart"; | 453 return prepareNavigation(() { |
| 454 //'''); | 454 assertNoRegionString('part "test_unit.dart"'); |
| 455 // return prepareNavigation(() { | 455 }); |
| 456 // assertNoRegionString('part "test_unit.dart"'); | |
| 457 // }); | |
| 458 } | 456 } |
| 459 | 457 |
| 460 test_targetElement() { | 458 test_targetElement() { |
| 461 addTestFile(''' | 459 addTestFile(''' |
| 462 class AAA {} | 460 class AAA {} |
| 463 main() { | 461 main() { |
| 464 AAA aaa = null; | 462 AAA aaa = null; |
| 465 } | 463 } |
| 466 '''); | 464 '''); |
| 467 return prepareNavigation(() { | 465 return prepareNavigation(() { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 481 final int length; | 479 final int length; |
| 482 final List<Element> targets; | 480 final List<Element> targets; |
| 483 | 481 |
| 484 NavigationRegion(this.offset, this.length, this.targets); | 482 NavigationRegion(this.offset, this.length, this.targets); |
| 485 | 483 |
| 486 @override | 484 @override |
| 487 String toString() { | 485 String toString() { |
| 488 return 'NavigationRegion(offset=$offset; length=$length; targets=$targets'; | 486 return 'NavigationRegion(offset=$offset; length=$length; targets=$targets'; |
| 489 } | 487 } |
| 490 } | 488 } |
| OLD | NEW |