@@ -10,13 +10,10 @@ void main() {
10
10
final exceptions = {
11
11
// the only valid use
12
12
'lib/shared/datastore.dart' ,
13
- // these should migrated away from using it
14
- 'lib/fake/server/fake_dartdoc_service.dart' ,
15
- 'lib/fake/server/fake_analyzer_service.dart' ,
16
- 'lib/fake/tool/init_data_file.dart' ,
17
13
};
18
14
19
15
test ('Only lib/shared/datastore.dart imports gcloud/db.dart' , () {
16
+ final foundExceptions = < String > {};
20
17
final gcloudDatastoreFiles = < String > [];
21
18
final gcloudDbFiles = < String > [];
22
19
for (final dir in ['bin' , 'lib' ]) {
@@ -28,7 +25,10 @@ void main() {
28
25
.toList ();
29
26
30
27
for (final file in files) {
31
- if (exceptions.contains (file.path)) continue ;
28
+ if (exceptions.contains (file.path)) {
29
+ foundExceptions.add (file.path);
30
+ continue ;
31
+ }
32
32
final content = file.readAsStringSync ();
33
33
if (content.contains ('package:gcloud/datastore.dart' )) {
34
34
gcloudDatastoreFiles.add (file.path);
@@ -41,5 +41,6 @@ void main() {
41
41
42
42
expect (gcloudDatastoreFiles, isEmpty);
43
43
expect (gcloudDbFiles, isEmpty);
44
+ expect (foundExceptions, exceptions);
44
45
});
45
46
}
0 commit comments