| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 findRegion(findOffset('new '), 'new'.length, true); | 362 findRegion(findOffset('new '), 'new'.length, true); |
| 363 assertHasTarget('A() {}', 0); | 363 assertHasTarget('A() {}', 0); |
| 364 } | 364 } |
| 365 { | 365 { |
| 366 findRegion(findOffset('A();'), 'A'.length, true); | 366 findRegion(findOffset('A();'), 'A'.length, true); |
| 367 assertHasTarget('A {'); | 367 assertHasTarget('A {'); |
| 368 } | 368 } |
| 369 }); | 369 }); |
| 370 } | 370 } |
| 371 | 371 |
| 372 test_multiplyDefinedElement() { |
| 373 addFile('$projectPath/bin/libA.dart', 'library A; int TEST = 1;'); |
| 374 addFile('$projectPath/bin/libB.dart', 'library B; int TEST = 2;'); |
| 375 addTestFile(''' |
| 376 import 'libA.dart'; |
| 377 import 'libB.dart'; |
| 378 main() { |
| 379 TEST; |
| 380 } |
| 381 '''); |
| 382 return prepareNavigation().then((_) { |
| 383 assertNoRegionAt('TEST'); |
| 384 }); |
| 385 } |
| 386 |
| 372 test_operator_arithmetic() { | 387 test_operator_arithmetic() { |
| 373 addTestFile(''' | 388 addTestFile(''' |
| 374 class A { | 389 class A { |
| 375 A operator +(other) => null; | 390 A operator +(other) => null; |
| 376 A operator -() => null; | 391 A operator -() => null; |
| 377 A operator -(other) => null; | 392 A operator -(other) => null; |
| 378 A operator *(other) => null; | 393 A operator *(other) => null; |
| 379 A operator /(other) => null; | 394 A operator /(other) => null; |
| 380 } | 395 } |
| 381 main() { | 396 main() { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 test_type_void() { | 552 test_type_void() { |
| 538 addTestFile(''' | 553 addTestFile(''' |
| 539 void main() { | 554 void main() { |
| 540 } | 555 } |
| 541 '''); | 556 '''); |
| 542 return prepareNavigation().then((_) { | 557 return prepareNavigation().then((_) { |
| 543 assertNoRegionAt('void'); | 558 assertNoRegionAt('void'); |
| 544 }); | 559 }); |
| 545 } | 560 } |
| 546 } | 561 } |
| OLD | NEW |