From 49d3c5a8717a4629f62b868209eba38794c3dd5c Mon Sep 17 00:00:00 2001 From: Janice Collins Date: Wed, 28 Mar 2018 10:02:56 -0700 Subject: [PATCH] Fix validation of SDK docs post-categories --- pubspec.lock | 2 +- testing/test_package/lib/fake.dart | 2 +- tool/grind.dart | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index b272f2af91..f8530019e1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -408,4 +408,4 @@ packages: source: hosted version: "2.1.13" sdks: - dart: ">=2.0.0-dev.23.0 <=2.0.0-dev.40.0" + dart: ">=2.0.0-dev.23.0 <=2.0.0-dev.43.0" diff --git a/testing/test_package/lib/fake.dart b/testing/test_package/lib/fake.dart index c8785fe785..1392aad5f2 100644 --- a/testing/test_package/lib/fake.dart +++ b/testing/test_package/lib/fake.dart @@ -224,7 +224,7 @@ class Cool { } /// A map initialization making use of optional const. -const Map myMap = { 1: "hello" }; +const Map myMap = {1: "hello"}; /// A variable initalization making use of optional new. Cool aCoolVariable = Cool(); diff --git a/tool/grind.dart b/tool/grind.dart index 452210a50b..144ce1064c 100644 --- a/tool/grind.dart +++ b/tool/grind.dart @@ -627,8 +627,8 @@ updateTestPackageDocs() async { @Task('Validate the SDK doc build.') @Depends(buildSdkDocs) validateSdkDocs() { - const expectedLibCount = 19; - + const expectedLibCount = 7; + const expectedSubLibCount = 12; File indexHtml = joinFile(sdkDocsDir, ['index.html']); if (!indexHtml.existsSync()) { fail('no index.html found for SDK docs'); @@ -642,12 +642,20 @@ validateSdkDocs() { } log('$foundLibs index.html dart: entries found'); + int foundSubLibs = + _findCount(indexContents, '