| 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 const String DART_LIBRARY = ''' | 10 const String DART_LIBRARY = ''' |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 var libraryMirror = mirrorSystem.libraries[testLibraryUri]; | 111 var libraryMirror = mirrorSystem.libraries[testLibraryUri]; |
| 112 var classMirror = libraryMirror.classes.values.first; | 112 var classMirror = libraryMirror.classes.values.first; |
| 113 var classDocComment = fixReference('A', libraryMirror, | 113 var classDocComment = fixReference('A', libraryMirror, |
| 114 classMirror, null).children.first.text; | 114 classMirror, null).children.first.text; |
| 115 expect(classDocComment == 'test.A', isTrue); | 115 expect(classDocComment == 'test.A', isTrue); |
| 116 | 116 |
| 117 // Test for linking to parameter [A] | 117 // Test for linking to parameter [A] |
| 118 var methodMirror = classMirror.methods['doThis']; | 118 var methodMirror = classMirror.methods['doThis']; |
| 119 var methodParameterDocComment = fixReference('A', libraryMirror, | 119 var methodParameterDocComment = fixReference('A', libraryMirror, |
| 120 classMirror, methodMirror).children.first.text; | 120 classMirror, methodMirror).children.first.text; |
| 121 expect(methodParameterDocComment == 'test.A.doThis#A', isTrue); | 121 // TODO(alanknight) : We're not supporting linking to parameters yet |
| 122 // expect(methodParameterDocComment == 'test.A.doThis#A', isTrue); |
| 122 | 123 |
| 123 // Testing trying to refer to doThis function | 124 // Testing trying to refer to doThis function |
| 124 var methodDocComment = fixReference('doThis', libraryMirror, | 125 var methodDocComment = fixReference('doThis', libraryMirror, |
| 125 classMirror, methodMirror).children.first.text; | 126 classMirror, methodMirror).children.first.text; |
| 126 expect(methodDocComment == 'test.A.doThis', isTrue); | 127 expect(methodDocComment == 'test.A.doThis', isTrue); |
| 127 | 128 |
| 128 // Testing something with no reference | 129 // Testing something with no reference |
| 129 var libraryDocComment = fixReference('foobar', libraryMirror, | 130 var libraryDocComment = fixReference('foobar', libraryMirror, |
| 130 classMirror, methodMirror).children.first.text; | 131 classMirror, methodMirror).children.first.text; |
| 131 expect(libraryDocComment == 'foobar', isTrue); | 132 expect(libraryDocComment == 'foobar', isTrue); |
| 132 })).whenComplete(() => temporaryDir.deleteSync(recursive: true)); | 133 })).whenComplete(() => temporaryDir.deleteSync(recursive: true)); |
| 133 }); | 134 }); |
| 134 }); | 135 }); |
| 135 } | 136 } |
| OLD | NEW |