| Index: pkg/docgen/test/generate_json_test.dart
|
| diff --git a/pkg/docgen/test/generate_json_test.dart b/pkg/docgen/test/generate_json_test.dart
|
| index 3e1615f86c6ac3f61536c51b37499eb3684b3d9d..522758caef1ac14030272a2eed73431f5f9bdb92 100644
|
| --- a/pkg/docgen/test/generate_json_test.dart
|
| +++ b/pkg/docgen/test/generate_json_test.dart
|
| @@ -36,7 +36,7 @@ void main() {
|
|
|
| d.dir('docs', [
|
| d.matcherFile('index.json', _isJsonMap),
|
| - d.matcherFile('index.txt', isNotNull),
|
| + d.matcherFile('index.txt', _hasSortedLines),
|
| d.matcherFile('library_list.json', _isJsonMap),
|
| d.matcherFile('testLib-bar.C.json', _isJsonMap),
|
| d.matcherFile('testLib-bar.json', _isJsonMap),
|
| @@ -47,9 +47,19 @@ void main() {
|
| d.matcherFile('testLib2-foo.B.json', _isJsonMap),
|
| d.matcherFile('testLib2-foo.json', _isJsonMap)
|
| ]).validate();
|
| +
|
| });
|
| }
|
|
|
| +final Matcher _hasSortedLines = predicate((String input) {
|
| + var lines = new LineSplitter().convert(input);
|
| +
|
| + var sortedLines = new List.from(lines)..sort();
|
| +
|
| + var orderedMatcher = orderedEquals(sortedLines);
|
| + return orderedMatcher.matches(lines, {});
|
| +}, 'String has sorted lines');
|
| +
|
| final Matcher _isJsonMap = predicate((input) {
|
| try {
|
| return JSON.decode(input) is Map;
|
|
|