| 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.services.src.index.local_file_index; | 5 library test.services.src.index.local_file_index; |
| 6 | 6 |
| 7 import 'dart:io'; | |
| 8 | |
| 9 import 'package:analysis_services/index/index.dart'; | 7 import 'package:analysis_services/index/index.dart'; |
| 10 import 'package:analysis_services/index/local_file_index.dart'; | 8 import 'package:analysis_services/index/local_file_index.dart'; |
| 11 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 12 | 10 |
| 13 | 11 |
| 14 main() { | 12 main() { |
| 15 groupSep = ' | '; | 13 groupSep = ' | '; |
| 16 test('createLocalFileIndex', () { | 14 test('createLocalFileIndex', () { |
| 17 Directory indexDirectory = Directory.systemTemp.createTempSync( | 15 Index index = createLocalFileIndex(); |
| 18 'AnalysisServer_index'); | |
| 19 try { | |
| 20 Index index = createLocalFileIndex(indexDirectory); | |
| 21 expect(index, isNotNull); | 16 expect(index, isNotNull); |
| 22 } finally { | 17 index.clear(); |
| 23 indexDirectory.delete(recursive: true); | |
| 24 } | |
| 25 }); | 18 }); |
| 26 } | 19 } |
| OLD | NEW |