| 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; | 5 library test.domain.analysis; |
| 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/constants.dart'; | 10 import 'package:analysis_server/src/constants.dart'; |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 int fff = 123; | 1346 int fff = 123; |
| 1347 A(this.fff); | 1347 A(this.fff); |
| 1348 } | 1348 } |
| 1349 '''; | 1349 '''; |
| 1350 return testNavigation(code, (NotificationNavigationHelper helper) { | 1350 return testNavigation(code, (NotificationNavigationHelper helper) { |
| 1351 helper.assertHasRegion('fff);', 'fff = 123'); | 1351 helper.assertHasRegion('fff);', 'fff = 123'); |
| 1352 }); | 1352 }); |
| 1353 }); | 1353 }); |
| 1354 | 1354 |
| 1355 group('instanceCreation', () { | 1355 group('instanceCreation', () { |
| 1356 test('implicit', () { |
| 1357 var code = ''' |
| 1358 class A { |
| 1359 } |
| 1360 main() { |
| 1361 new A(); |
| 1362 } |
| 1363 '''; |
| 1364 return testNavigation(code, (NotificationNavigationHelper helper) { |
| 1365 helper.asserHasRegionInts( |
| 1366 helper.findOffset('new A'), 'new A'.length, |
| 1367 helper.findOffset('A {'), 'A'.length); |
| 1368 }); |
| 1369 }); |
| 1370 |
| 1356 test('named', () { | 1371 test('named', () { |
| 1357 var code = ''' | 1372 var code = ''' |
| 1358 class A { | 1373 class A { |
| 1359 A.named() {} | 1374 A.named() {} |
| 1360 } | 1375 } |
| 1361 main() { | 1376 main() { |
| 1362 new A.named(); | 1377 new A.named(); |
| 1363 } | 1378 } |
| 1364 '''; | 1379 '''; |
| 1365 return testNavigation(code, (NotificationNavigationHelper helper) { | 1380 return testNavigation(code, (NotificationNavigationHelper helper) { |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 // subscribe | 1632 // subscribe |
| 1618 helper.addAnalysisSubscriptionHighlights(helper.testFile); | 1633 helper.addAnalysisSubscriptionHighlights(helper.testFile); |
| 1619 // wait, has regions | 1634 // wait, has regions |
| 1620 return helper.waitForOperationsFinished().then((_) { | 1635 return helper.waitForOperationsFinished().then((_) { |
| 1621 var highlights = helper.getHighlights(helper.testFile); | 1636 var highlights = helper.getHighlights(helper.testFile); |
| 1622 expect(highlights, isNot(isEmpty)); | 1637 expect(highlights, isNot(isEmpty)); |
| 1623 }); | 1638 }); |
| 1624 }); | 1639 }); |
| 1625 }); | 1640 }); |
| 1626 } | 1641 } |
| OLD | NEW |