@@ -1276,37 +1276,38 @@ Future<void> testDartdocFlutterPlugin() async {
1276
1276
@Depends (buildSdkDocs)
1277
1277
void validateSdkDocs () {
1278
1278
const expectedLibCounts = 0 ;
1279
- const expectedSubLibCount = {18 , 19 };
1280
- const expectedTotalCount = {18 , 19 };
1279
+ const expectedSubLibCount = {18 , 19 , 20 };
1280
+ const expectedTotalCount = {18 , 19 , 20 };
1281
1281
var indexHtml = joinFile (_sdkDocsDir, ['index.html' ]);
1282
1282
if (! indexHtml.existsSync ()) {
1283
- fail ('no index.html found for SDK docs' );
1283
+ fail ("No ' index.html' found for the SDK docs" );
1284
1284
}
1285
- log ('found index.html' );
1285
+ log ("Found ' index.html'" );
1286
1286
var indexContents = indexHtml.readAsStringSync ();
1287
1287
var foundLibs = _findCount (indexContents, ' <li><a href="dart-' );
1288
1288
if (expectedLibCounts != foundLibs) {
1289
- fail ('expected $expectedLibCounts " dart:" index.html entries, found '
1290
- '$foundLibs ' );
1289
+ fail ("Expected $expectedLibCounts ' dart:' entries in ' index.html', but "
1290
+ 'found $foundLibs ' );
1291
1291
}
1292
- log (' $foundLibs index.html dart: entries found' );
1292
+ log ("Found $foundLibs ' dart:' entries in 'index.html'" );
1293
1293
1294
1294
var foundSubLibs =
1295
1295
_findCount (indexContents, '<li class="section-subitem"><a href="dart-' );
1296
1296
if (! expectedSubLibCount.contains (foundSubLibs)) {
1297
- fail ('expected $expectedSubLibCount " dart:" index.html entries in '
1298
- 'categories, found $foundSubLibs ' );
1297
+ fail ("Expected $expectedSubLibCount ' dart:' entries in ' index.html' to be "
1298
+ 'in categories, but found $foundSubLibs ' );
1299
1299
}
1300
1300
log ('$foundSubLibs index.html dart: entries in categories found' );
1301
1301
1302
1302
// check for the existence of certain files/dirs
1303
1303
var libsLength =
1304
1304
_sdkDocsDir.listSync ().where ((fs) => fs.path.contains ('dart-' )).length;
1305
1305
if (! expectedTotalCount.contains (libsLength)) {
1306
- fail ('docs not generated for all the SDK libraries, '
1307
- 'expected $expectedTotalCount directories, generated $libsLength directories' );
1306
+ fail ('Docs not generated for all the SDK libraries; expected '
1307
+ '$expectedTotalCount directories, but $libsLength directories were '
1308
+ 'generated' );
1308
1309
}
1309
- log (' $libsLength dart: libraries found' );
1310
+ log ("Found $libsLength ' dart:' libraries" );
1310
1311
1311
1312
var futureConstFile =
1312
1313
joinFile (_sdkDocsDir, [p.join ('dart-async' , 'Future' , 'Future.html' )]);
0 commit comments