@@ -418,6 +418,36 @@ void main() {
418418 short = fakeLibrary.functions.firstWhere ((f) => f.name == 'short' );
419419 });
420420
421+ group ('markdown extensions' , () {
422+ Class DocumentWithATable ;
423+ String docsAsHtml;
424+
425+ setUp (() {
426+ DocumentWithATable = fakeLibrary.classes
427+ .firstWhere ((cls) => cls.name == 'DocumentWithATable' );
428+ docsAsHtml = DocumentWithATable .documentationAsHtml;
429+ });
430+
431+ test ('Verify table appearance' , () {
432+ expect (docsAsHtml.contains ('<table><thead><tr><th>Component</th>' ),
433+ isTrue);
434+ });
435+
436+ test ('Verify links inside of table headers' , () {
437+ expect (
438+ docsAsHtml.contains (
439+ '<th><a href="fake/Annotation-class.html">Annotation</a></th>' ),
440+ isTrue);
441+ });
442+
443+ test ('Verify links inside of table body' , () {
444+ expect (
445+ docsAsHtml.contains (
446+ '<tbody><tr><td><a href="fake/DocumentWithATable/foo-constant.html">foo</a></td>' ),
447+ isTrue);
448+ });
449+ });
450+
421451 group ('doc references' , () {
422452 String docsAsHtml;
423453
@@ -1863,9 +1893,8 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
18631893 exLibrary.constants.firstWhere ((c) => c.name == 'deprecated' );
18641894 Class Dog = exLibrary.allClasses.firstWhere ((c) => c.name == 'Dog' );
18651895 aStaticConstField =
1866- Dog .allFields.firstWhere ((f) => f.name == 'aStaticConstField' );
1867- aName =
1868- Dog .allFields.firstWhere ((f) => f.name == 'aName' );
1896+ Dog .allFields.firstWhere ((f) => f.name == 'aStaticConstField' );
1897+ aName = Dog .allFields.firstWhere ((f) => f.name == 'aName' );
18691898 });
18701899
18711900 test ('substrings of the constant values type are not linked (#1535)' , () {
@@ -1903,8 +1932,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
19031932 });
19041933
19051934 test ('MY_CAT is not linked' , () {
1906- expect (cat.constantValue,
1907- 'const ConstantCat('tabby')' );
1935+ expect (cat.constantValue, 'const ConstantCat('tabby')' );
19081936 });
19091937
19101938 test ('exported property' , () {
@@ -1920,21 +1948,24 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
19201948 setUp (() {
19211949 apple = exLibrary.classes.firstWhere ((c) => c.name == 'Apple' );
19221950 constCat = exLibrary.classes.firstWhere ((c) => c.name == 'ConstantCat' );
1923- constructorTester = fakeLibrary.classes.firstWhere ((c) => c.name == 'ConstructorTester' );
1951+ constructorTester =
1952+ fakeLibrary.classes.firstWhere ((c) => c.name == 'ConstructorTester' );
19241953 constCatConstructor = constCat.constructors[0 ];
19251954 appleDefaultConstructor =
19261955 apple.constructors.firstWhere ((c) => c.name == 'Apple' );
19271956 appleConstructorFromString =
19281957 apple.constructors.firstWhere ((c) => c.name == 'Apple.fromString' );
1929- constructorTesterDefault =
1930- constructorTester.constructors .firstWhere ((c) => c.name == 'ConstructorTester' );
1931- constructorTesterFromSomething =
1932- constructorTester.constructors .firstWhere ((c) => c.name == 'ConstructorTester.fromSomething' );
1958+ constructorTesterDefault = constructorTester.constructors
1959+ .firstWhere ((c) => c.name == 'ConstructorTester' );
1960+ constructorTesterFromSomething = constructorTester.constructors
1961+ .firstWhere ((c) => c.name == 'ConstructorTester.fromSomething' );
19331962 });
19341963
19351964 test ('displays generic parameters correctly' , () {
1936- expect (constructorTesterDefault.nameWithGenerics, 'ConstructorTester<A, B>' );
1937- expect (constructorTesterFromSomething.nameWithGenerics, 'ConstructorTester<A, B>.fromSomething' );
1965+ expect (constructorTesterDefault.nameWithGenerics,
1966+ 'ConstructorTester<A, B>' );
1967+ expect (constructorTesterFromSomething.nameWithGenerics,
1968+ 'ConstructorTester<A, B>.fromSomething' );
19381969 });
19391970
19401971 test ('has a fully qualified name' , () {
0 commit comments