| 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 docgen.test.typedef; | 5 library docgen.test.typedef; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 var classes = testLibBar['classes'] as Map<String, dynamic>; | 45 var classes = testLibBar['classes'] as Map<String, dynamic>; |
| 46 | 46 |
| 47 expect(classes, hasLength(3)); | 47 expect(classes, hasLength(3)); |
| 48 | 48 |
| 49 expect(classes['class'], isList); | 49 expect(classes['class'], isList); |
| 50 expect(classes['error'], isList); | 50 expect(classes['error'], isList); |
| 51 | 51 |
| 52 var typeDefs = classes['typedef'] as Map<String, dynamic>; | 52 var typeDefs = classes['typedef'] as Map<String, dynamic>; |
| 53 var comparator = typeDefs['AnATransformer'] as Map<String, dynamic>; | 53 var comparator = typeDefs['AnATransformer'] as Map<String, dynamic>; |
| 54 | 54 |
| 55 var expectedPreview = '<p>Processes a [C] instance for testing.</p>'; | 55 var expectedPreview = |
| 56 '<p>Processes a <a>test_lib-bar.C</a> instance for testing.</p>'; |
| 56 | 57 |
| 57 expect(comparator['preview'], expectedPreview); | 58 expect(comparator['preview'], expectedPreview); |
| 58 | 59 |
| 59 var expectedComment = expectedPreview + '\n' | 60 var expectedComment = expectedPreview + '\n' |
| 60 '<p>To eliminate import warnings for [A] and to test typedefs.</p>'; | 61 '<p>To eliminate import warnings for <a>test_lib.A</a> and to test ' |
| 62 'typedefs.</p>'; |
| 61 | 63 |
| 62 expect(comparator['comment'], expectedComment); | 64 expect(comparator['comment'], expectedComment); |
| 63 }); | 65 }); |
| 64 }); | 66 }); |
| 65 } | 67 } |
| OLD | NEW |