Record total strict counts for common mark tests
diff --git a/tool/common_mark_stats.txt b/tool/common_mark_stats.txt
index 5a11e75..32ff4dd 100644
--- a/tool/common_mark_stats.txt
+++ b/tool/common_mark_stats.txt
@@ -25,3 +25,4 @@
3 of 3 – 100.0% Textual content
19 of 19 – 100.0% Thematic breaks
579 of 624 – 92.8% TOTAL
+ 404 of 624 – 64.7% TOTAL Strict
diff --git a/tool/gfm_stats.txt b/tool/gfm_stats.txt
index fb5d10e..85e7b4a 100644
--- a/tool/gfm_stats.txt
+++ b/tool/gfm_stats.txt
@@ -29,3 +29,4 @@
3 of 3 – 100.0% Textual content
19 of 19 – 100.0% Thematic breaks
600 of 654 – 91.7% TOTAL
+ 410 of 654 – 62.7% TOTAL Strict
diff --git a/tool/stats.dart b/tool/stats.dart
index 476c74c..7ee58ed 100644
--- a/tool/stats.dart
+++ b/tool/stats.dart
@@ -151,13 +151,17 @@
await sink.close();
}
+String _pct(int value, int total, String section) =>
+ '${value.toString().padLeft(4)} '
+ 'of ${total.toString().padLeft(4)} '
+ '– ${(100 * value / total).toStringAsFixed(1).padLeft(5)}% $section';
+
Future _printFriendly(
String testPrefix,
SplayTreeMap<String, SplayTreeMap<int, CompareLevel>> scores,
bool updateFiles) async {
- const countWidth = 4;
-
var totalValid = 0;
+ var totalStrict = 0;
var totalExamples = 0;
IOSink sink;
@@ -182,20 +186,14 @@
var sectionValidCount = sectionStrictCount + sectionLooseCount;
+ totalStrict += sectionStrictCount;
totalValid += sectionValidCount;
- var pct = (100 * sectionValidCount / total).toStringAsFixed(1).padLeft(5);
-
- sink.writeln('${sectionValidCount.toString().padLeft(countWidth)} '
- 'of ${total.toString().padLeft(countWidth)} '
- '– $pct% $section');
+ sink.writeln(_pct(sectionValidCount, total, section));
});
- var pct = (100 * totalValid / totalExamples).toStringAsFixed(1).padLeft(5);
-
- sink.writeln('${totalValid.toString().padLeft(countWidth)} '
- 'of ${totalExamples.toString().padLeft(countWidth)} '
- '– $pct% TOTAL');
+ sink.writeln(_pct(totalValid, totalExamples, 'TOTAL'));
+ sink.writeln(_pct(totalStrict, totalExamples, 'TOTAL Strict'));
await sink.flush();
await sink.close();