| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'dart:io'; | 5 import 'dart:io'; |
| 6 import 'dart:uri'; | 6 import 'dart:uri'; |
| 7 | 7 |
| 8 import 'package:pathos/path.dart' as pathos; | 8 import 'package:pathos/path.dart' as pathos; |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 10 | 10 |
| 11 import '../lib/src/export_map.dart'; | 11 import '../lib/src/export_map.dart'; |
| 12 import '../lib/src/dartdoc/utils.dart'; | 12 import '../lib/src/dartdoc/utils.dart'; |
| 13 | 13 |
| 14 String tempDir; | 14 String tempDir; |
| 15 | 15 |
| 16 // TODO(johnniwinther): Update this. |
| 16 main() { | 17 main() { |
| 17 group('ExportMap', () { | 18 group('ExportMap', () { |
| 18 setUp(createTempDir); | 19 setUp(createTempDir); |
| 19 tearDown(deleteTempDir); | 20 tearDown(deleteTempDir); |
| 20 | 21 |
| 21 test('with an empty library', () { | 22 test('with an empty library', () { |
| 22 createLibrary('lib.dart'); | 23 createLibrary('lib.dart'); |
| 23 var map = parse(['lib.dart']); | 24 var map = parse(['lib.dart']); |
| 24 | 25 |
| 25 var expectedExports = {}; | 26 var expectedExports = {}; |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 String libPath(String name) => pathos.normalize(pathos.join(tempDir, name)); | 392 String libPath(String name) => pathos.normalize(pathos.join(tempDir, name)); |
| 392 | 393 |
| 393 void createTempDir() { | 394 void createTempDir() { |
| 394 tempDir = new Directory('').createTempSync().path; | 395 tempDir = new Directory('').createTempSync().path; |
| 395 new Directory(pathos.join(tempDir, 'packages')).createSync(); | 396 new Directory(pathos.join(tempDir, 'packages')).createSync(); |
| 396 } | 397 } |
| 397 | 398 |
| 398 void deleteTempDir() { | 399 void deleteTempDir() { |
| 399 new Directory(tempDir).deleteSync(recursive: true); | 400 new Directory(tempDir).deleteSync(recursive: true); |
| 400 } | 401 } |
| OLD | NEW |