diff --git a/pubspec.lock b/pubspec.lock
index ec9156362b..47c7b29cca 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -88,7 +88,7 @@ packages:
markdown:
description: markdown
source: hosted
- version: "0.7.1+3"
+ version: "0.7.2"
matcher:
description: matcher
source: hosted
diff --git a/pubspec.yaml b/pubspec.yaml
index 62aa51ad8f..febc1a7389 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -13,7 +13,7 @@ dependencies:
html: ^0.12.1
http: ^0.11.0
logging: '>=0.9.0 <0.12.0'
- markdown: ^0.7.1
+ markdown: ^0.7.2
mustache4dart: ^1.0.9
path: ^1.3.0
pub_cache: ^0.1.0
diff --git a/test/model_test.dart b/test/model_test.dart
index 72351a9699..991e1e6d20 100644
--- a/test/model_test.dart
+++ b/test/model_test.dart
@@ -34,7 +34,8 @@ void main() {
exit(1);
}
- Package sdkAsPackage = new Package(getSdkLibrariesToDocument(
+ Package sdkAsPackage = new Package(
+ getSdkLibrariesToDocument(
testUtils.sdkDir, testUtils.analyzerHelper.context),
new PackageMeta.fromSdk(sdkDir));
@@ -93,7 +94,8 @@ void main() {
Library dartAsyncLib;
setUp(() {
- dartAsyncLib = new Library(getSdkLibrariesToDocument(
+ dartAsyncLib = new Library(
+ getSdkLibrariesToDocument(
testUtils.sdkDir, testUtils.analyzerHelper.context).first,
sdkAsPackage);
@@ -224,33 +226,33 @@ void main() {
});
test('links to a reference to its class', () {
- expect(docsAsHtml, contains(
- 'BaseForDocComments'));
+ expect(
+ docsAsHtml,
+ contains(
+ 'BaseForDocComments'));
});
test(
'links to a reference to a top-level const with multiple underscores',
() {
expect(
- docsAsHtml, contains('NAME_WITH_TWO_UNDERSCORES'));
- }, skip: 'Wait for https://github.com/dart-lang/dartdoc/issues/768');
-
- // remove this test when the above is fixed. just here to track when
- // the behavior changes
- test(
- 'literally renders a reference to a top-level const with multiple underscores',
- () {
- expect(docsAsHtml, contains('[NAME_WITH_TWO_UNDERSCORES]'));
+ docsAsHtml,
+ contains(
+ 'NAME_WITH_TWO_UNDERSCORES'));
});
test('links to a method in this class', () {
- expect(docsAsHtml, contains(
- 'anotherMethod'));
+ expect(
+ docsAsHtml,
+ contains(
+ 'anotherMethod'));
});
test('links to a top-level function in this library', () {
- expect(docsAsHtml, contains(
- 'topLevelFunction'));
+ expect(
+ docsAsHtml,
+ contains(
+ 'topLevelFunction'));
});
test('links to top-level function from an imported library', () {
@@ -263,34 +265,44 @@ void main() {
});
test('links to a top-level const from an imported lib', () {
- expect(docsAsHtml, contains(
- 'incorrectDocReference'));
+ expect(
+ docsAsHtml,
+ contains(
+ 'incorrectDocReference'));
});
test('links to a top-level variable with a prefix from an imported lib',
() {
expect(docsAsHtml,
contains('css.theOnlyThingInTheLibrary'));
- }, skip: 'Wait for https://github.com/dart-lang/dartdoc/issues/767 to be fixed');
+ },
+ skip:
+ 'Wait for https://github.com/dart-lang/dartdoc/issues/767 to be fixed');
// remove this test when the above test is fixed. just here to
// track when the behavior changes
test('codeifies a prefixed top-level variable an imported lib', () {
- expect(docsAsHtml, contains(
- 'css.theOnlyThingInTheLibrary
'));
+ expect(
+ docsAsHtml,
+ contains(
+ 'css.theOnlyThingInTheLibrary
'));
});
test('links to a name with a single underscore', () {
- expect(docsAsHtml, contains(
- 'NAME_SINGLEUNDERSCORE'));
+ expect(
+ docsAsHtml,
+ contains(
+ 'NAME_SINGLEUNDERSCORE'));
});
});
test('multi-underscore names in brackets do not become italicized', () {
expect(short.documentation, contains('[NAME_WITH_TWO_UNDERSCORES]'));
- expect(short.documentationAsHtml, contains(
- 'NAME_WITH_TWO_UNDERSCORES'));
- }, skip: 'Wait for https://github.com/dart-lang/dartdoc/issues/768');
+ expect(
+ short.documentationAsHtml,
+ contains(
+ 'NAME_WITH_TWO_UNDERSCORES'));
+ });
test('still has brackets inside code blocks', () {
expect(topLevelFunction.documentationAsHtml,
@@ -301,8 +313,10 @@ void main() {
() {
Method add =
specialList.allInstanceMethods.firstWhere((m) => m.name == 'add');
- expect(add.oneLineDoc, equals(
- 'Adds value
to the end of this list,\nextending the length by one.'));
+ expect(
+ add.oneLineDoc,
+ equals(
+ 'Adds value
to the end of this list,\nextending the length by one.'));
});
test(
@@ -310,8 +324,10 @@ void main() {
() {
Method add =
specialList.allInstanceMethods.firstWhere((m) => m.name == 'add');
- expect(add.documentationAsHtml, startsWith(
- '
Adds value
to the end of this list,\nextending the length by one.'));
+ expect(
+ add.documentationAsHtml,
+ startsWith(
+ '
Adds value
to the end of this list,\nextending the length by one.'));
});
test('incorrect doc references are still wrapped in code blocks', () {
@@ -330,8 +346,10 @@ void main() {
});
test('doc ref to class in SDK does not render as link', () {
- expect(thisIsAsync.documentationAsHtml, equals(
- '
An async function. It should look like I return a Future
.
An async function. It should look like I return a Future
.
Apple
.'));
+ expect(
+ resolved,
+ contains(
+ 'linking over to Apple
.'));
});
test('references to class and constructors', () {
@@ -351,8 +371,10 @@ void main() {
contains('Extends class Apple'));
expect(
comment, contains('use new Apple'));
- expect(comment, contains(
- 'new Apple.fromString'));
+ expect(
+ comment,
+ contains(
+ 'new Apple.fromString'));
});
test('reference to class from another library', () {
@@ -362,13 +384,17 @@ void main() {
test('reference to method', () {
String comment = foo2.documentationAsHtml;
- expect(comment, equals(
- 'link to method from class Apple.m
')); + expect( + comment, + equals( + 'link to method from class Apple.m
')); }); test('legacy code blocks render correctly', () { - expect(testingCodeSyntaxInOneLiners.oneLineDoc, equals( - 'These are code syntaxes:true
and false
'));
+ expect(
+ testingCodeSyntaxInOneLiners.oneLineDoc,
+ equals(
+ 'These are code syntaxes: true
and false
'));
});
test('doc comments to parameters are marked as code', () {
@@ -493,8 +519,8 @@ void main() {
test('exported class should have linkedReturnType for the current library',
() {
- Method toUTC = DT.instanceMethods.firstWhere((m) => m.name == 'toUtc',
- orElse: () => null);
+ Method toUTC = DT.instanceMethods
+ .firstWhere((m) => m.name == 'toUtc', orElse: () => null);
expect(toUTC, isNotNull);
expect(toUTC.linkedReturnType,
equals('DateTime'));
@@ -626,10 +652,14 @@ void main() {
test('async function', () {
expect(thisIsAsync.isAsynchronous, isTrue);
expect(thisIsAsync.linkedReturnType, equals('Future'));
- expect(thisIsAsync.documentation, equals(
- 'An async function. It should look like I return a [Future].'));
- expect(thisIsAsync.documentationAsHtml, equals(
- 'An async function. It should look like I return a Future
.
An async function. It should look like I return a Future
.