Skip to content

Commit 70c4bcd

Browse files
srawlinsCommit Queue
authored andcommitted
linter: Clean up dead test code
These likely could just be simplified after removing the old integration tests. No tests are actually run in `rule_test.dart`. Change-Id: I7f377368e100ee7eb5bcfdd5d9dba1e8bb26f43a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432400 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 86341c9 commit 70c4bcd

File tree

3 files changed

+7
-43
lines changed

3 files changed

+7
-43
lines changed

pkg/linter/test/all.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import 'integration_test.dart' as integration;
1212
import 'lint_code_test.dart' as lint_code;
1313
import 'mocks.dart';
1414
import 'pubspec_test.dart' as pubspec;
15-
import 'rule_test.dart' as rule;
1615
import 'rules/all.dart' as rules;
1716
import 'scope_util_test.dart' as scope_util;
1817
import 'utils_test.dart' as utils;
@@ -37,7 +36,6 @@ void main() {
3736
integration.main();
3837
lint_code.main();
3938
pubspec.main();
40-
rule.main();
4139
rules.main();
4240
scope_util.main();
4341
utils.main();

pkg/linter/test/integration_test.dart

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,18 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'dart:io';
6-
7-
import 'package:analyzer/src/lint/io.dart';
85
import 'package:test/test.dart';
96

107
import '../tool/checks/check_all_yaml.dart';
118
import '../tool/checks/check_messages_yaml.dart';
129

1310
void main() {
14-
group('integration', () {
15-
group('config', () {
16-
var currentOut = outSink;
17-
var collectingOut = StringBuffer();
18-
setUp(() {
19-
exitCode = 0;
20-
outSink = collectingOut;
21-
});
22-
tearDown(() {
23-
collectingOut.clear();
24-
outSink = currentOut;
25-
exitCode = 0;
26-
});
27-
});
28-
29-
group('examples', () {
30-
test('all.yaml', () {
31-
var errors = checkAllYaml();
32-
if (errors != null) {
33-
fail(errors);
34-
}
35-
});
36-
});
37-
38-
test('messages.yaml', checkMessagesYaml);
11+
test('examples/all.yaml is correct', () {
12+
var errors = checkAllYaml();
13+
if (errors != null) {
14+
fail(errors);
15+
}
3916
});
17+
18+
test('messages.yaml is correct', checkMessagesYaml);
4019
}

pkg/linter/test/rule_test.dart

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)