| 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.integration.completion.get.suggestions; | 5 library test.integration.completion.get.suggestions; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 var test = ''; | 24 var test = ''; |
| 25 main() { | 25 main() { |
| 26 test. | 26 test. |
| 27 } | 27 } |
| 28 '''; | 28 '''; |
| 29 writeFile(pathname, text); | 29 writeFile(pathname, text); |
| 30 standardAnalysisSetup(); | 30 standardAnalysisSetup(); |
| 31 | 31 |
| 32 return analysisFinished.then((_) { | 32 return analysisFinished.then((_) { |
| 33 return sendCompletionGetSuggestions( | 33 return sendCompletionGetSuggestions( |
| 34 pathname, | 34 pathname, text.indexOf('test.') + 'test.'.length).then((result) { |
| 35 text.indexOf('test.') + 'test.'.length).then((result) { | |
| 36 // Since the feature doesn't work yet, just pause for a second to | 35 // Since the feature doesn't work yet, just pause for a second to |
| 37 // collect the output of the analysis server, and then stop the test. | 36 // collect the output of the analysis server, and then stop the test. |
| 38 // TODO(paulberry): finish writing the integration test once the feature | 37 // TODO(paulberry): finish writing the integration test once the feature |
| 39 // it more complete. | 38 // it more complete. |
| 40 return new Future.delayed(new Duration(seconds: 1), () { | 39 return new Future.delayed(new Duration(seconds: 1), () { |
| 41 fail('test not completed yet'); | 40 fail('test not completed yet'); |
| 42 }); | 41 }); |
| 43 }); | 42 }); |
| 44 }); | 43 }); |
| 45 } | 44 } |
| 46 | 45 |
| 47 test_placeholder() { | 46 test_placeholder() { |
| 48 // The unit test framework freaks out if there are no tests, so this is a | 47 // The unit test framework freaks out if there are no tests, so this is a |
| 49 // placeholder until we have a passing test. | 48 // placeholder until we have a passing test. |
| 50 // TODO(paulberry): remove this. | 49 // TODO(paulberry): remove this. |
| 51 } | 50 } |
| 52 } | 51 } |
| OLD | NEW |