OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import 'package:analysis_server/src/services/correction/strings.dart'; | 7 import 'package:analysis_server/src/services/correction/strings.dart'; |
8 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
9 import 'package:test/test.dart'; | 9 import 'package:test/test.dart'; |
10 | 10 |
11 import '../../tool/spec/api.dart'; | 11 import '../../tool/spec/api.dart'; |
12 import '../../tool/spec/from_html.dart'; | 12 import '../../tool/spec/from_html.dart'; |
13 | 13 |
14 // TODO(devoncarew): Several of the analysis domain methods are covered, but | |
15 // they aren't using the below file name pattern. | |
16 | |
17 /// Define tests to fail if there's no mention in the coverage file. | 14 /// Define tests to fail if there's no mention in the coverage file. |
18 main() { | 15 main() { |
19 Api api; | 16 Api api; |
20 File coverageFile; | 17 File coverageFile; |
21 String pathPrefix; | 18 String pathPrefix; |
22 | 19 |
23 // parse the API file | 20 // parse the API file |
24 if (FileSystemEntity | 21 if (FileSystemEntity |
25 .isFileSync(path.join('tool', 'spec', 'spec_input.html'))) { | 22 .isFileSync(path.join('tool', 'spec', 'spec_input.html'))) { |
26 api = readApi('.'); | 23 api = readApi('.'); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 92 |
96 // validate no unexpected domains | 93 // validate no unexpected domains |
97 group('integration coverage', () { | 94 group('integration coverage', () { |
98 test('no unexpected domains', () { | 95 test('no unexpected domains', () { |
99 for (String domain in coveredDomains) { | 96 for (String domain in coveredDomains) { |
100 expect(api.domains.map((d) => d.name), contains(domain)); | 97 expect(api.domains.map((d) => d.name), contains(domain)); |
101 } | 98 } |
102 }); | 99 }); |
103 }); | 100 }); |
104 } | 101 } |
OLD | NEW |