diff --git a/pkg/linter/test/rules/always_specify_types_test.dart b/pkg/linter/test/rules/always_specify_types_test.dart index 1778a84716b..018059d358a 100644 --- a/pkg/linter/test/rules/always_specify_types_test.dart +++ b/pkg/linter/test/rules/always_specify_types_test.dart @@ -28,20 +28,6 @@ final Foo1 foo = Foo1(); '''); } - test_34() async { - // https://github.com/dart-lang/linter/issues/851 - await assertNoDiagnostics(r''' -import 'package:meta/meta.dart'; -void f() { - g(); - g(); -} - -@optionalTypeArgs -void g() {} -'''); - } - test_catchVariable_omitted() async { // https://codereview.chromium.org/1427223002/ await assertNoDiagnostics(r''' @@ -493,6 +479,34 @@ void f() { ); } + test_function_optionalTypeArgs() async { + // https://github.com/dart-lang/linter/issues/851 + await assertNoDiagnostics(r''' +import 'package:meta/meta.dart'; +void f() { + g(); + g(); +} + +@optionalTypeArgs +void g() {} +'''); + } + + test_function_optionalTypeArgs_withBound() async { + // https://github.com/dart-lang/linter/issues/851 + await assertNoDiagnostics(r''' +import 'package:meta/meta.dart'; +void f() { + g(); + g(); +} + +@optionalTypeArgs +void g() {} +'''); + } + test_function_parameterType_explicit() async { await assertNoDiagnostics(r''' void f(int x) {}