| OLD | NEW |
| 1 library single_library_test; | 1 library single_library_test; |
| 2 | 2 |
| 3 import 'dart:io'; | 3 import 'dart:io'; |
| 4 | 4 |
| 5 import 'package:path/path.dart' as path; | 5 import 'package:path/path.dart' as path; |
| 6 import 'package:unittest/unittest.dart'; | 6 import 'package:unittest/unittest.dart'; |
| 7 | 7 |
| 8 import '../lib/docgen.dart'; | 8 import '../lib/docgen.dart'; |
| 9 | 9 |
| 10 main() { | 10 main() { |
| 11 group('Generate docs for', () { | 11 group('Generate docs for', () { |
| 12 test('one simple file.', () { | 12 test('one simple file.', () { |
| 13 var temporaryDir = Directory.createSystemTempSync('single_library_'); | 13 var temporaryDir = Directory.systemTemp.createTempSync('single_library_'); |
| 14 var fileName = path.join(temporaryDir.path, 'temp.dart'); | 14 var fileName = path.join(temporaryDir.path, 'temp.dart'); |
| 15 var file = new File(fileName); | 15 var file = new File(fileName); |
| 16 file.writeAsStringSync(''' | 16 file.writeAsStringSync(''' |
| 17 library test; | 17 library test; |
| 18 /** | 18 /** |
| 19 * Doc comment for class [A]. | 19 * Doc comment for class [A]. |
| 20 * | 20 * |
| 21 * Multiline Test | 21 * Multiline Test |
| 22 */ | 22 */ |
| 23 /* | 23 /* |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 expect(methodDocComment == 'test.A.doThis', isTrue); | 125 expect(methodDocComment == 'test.A.doThis', isTrue); |
| 126 | 126 |
| 127 // Testing something with no reference | 127 // Testing something with no reference |
| 128 var libraryDocComment = fixReference('foobar', libraryMirror, | 128 var libraryDocComment = fixReference('foobar', libraryMirror, |
| 129 classMirror, methodMirror).children.first.text; | 129 classMirror, methodMirror).children.first.text; |
| 130 expect(libraryDocComment == 'foobar', isTrue); | 130 expect(libraryDocComment == 'foobar', isTrue); |
| 131 })).whenComplete(() => temporaryDir.deleteSync(recursive: true)); | 131 })).whenComplete(() => temporaryDir.deleteSync(recursive: true)); |
| 132 }); | 132 }); |
| 133 }); | 133 }); |
| 134 } | 134 } |
| OLD | NEW |