Index: pkg/analyzer/test/generated/hint_code_test.dart |
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart |
index 2bf341fe204233ab903dcfc8b9be93aadaac1ce8..45f06d50062b1b5abc4a3a6c229f332e700e703a 100644 |
--- a/pkg/analyzer/test/generated/hint_code_test.dart |
+++ b/pkg/analyzer/test/generated/hint_code_test.dart |
@@ -1381,73 +1381,73 @@ class A { |
verify([source]); |
} |
- test_invalidRequiredParam_valid() async { |
+ test_invalidRequiredParam_on_named_parameter_with_default() async { |
Source source = addNamedSource( |
'/lib1.dart', |
r''' |
import 'package:meta/meta.dart'; |
-m1() => null; |
-m2(a) => null; |
-m3([a]) => null; |
-m4({a}) => null; |
-m5({@required a}) => null; |
-m6({a, @required b}) => null; |
+m({@required a = 1}) => null; |
'''); |
await computeAnalysisResult(source); |
- assertNoErrors(source); |
+ assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]); |
verify([source]); |
} |
- test_invalidRequiredParam_on_required_parameter() async { |
+ test_invalidRequiredParam_on_positional_parameter() async { |
Source source = addNamedSource( |
'/lib1.dart', |
r''' |
import 'package:meta/meta.dart'; |
-m(@required a) => null; |
+m([@required a]) => null; |
'''); |
await computeAnalysisResult(source); |
assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]); |
verify([source]); |
} |
- test_invalidRequiredParam_on_positional_parameter() async { |
+ test_invalidRequiredParam_on_positional_parameter_with_default() async { |
Source source = addNamedSource( |
'/lib1.dart', |
r''' |
import 'package:meta/meta.dart'; |
-m([@required a]) => null; |
+m([@required a = 1]) => null; |
'''); |
await computeAnalysisResult(source); |
assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]); |
verify([source]); |
} |
- test_invalidRequiredParam_on_positional_parameter_with_default() async { |
+ test_invalidRequiredParam_on_required_parameter() async { |
Source source = addNamedSource( |
'/lib1.dart', |
r''' |
import 'package:meta/meta.dart'; |
-m([@required a = 1]) => null; |
+m(@required a) => null; |
'''); |
await computeAnalysisResult(source); |
assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]); |
verify([source]); |
} |
- test_invalidRequiredParam_on_named_parameter_with_default() async { |
+ test_invalidRequiredParam_valid() async { |
Source source = addNamedSource( |
'/lib1.dart', |
r''' |
import 'package:meta/meta.dart'; |
-m({@required a = 1}) => null; |
+m1() => null; |
+m2(a) => null; |
+m3([a]) => null; |
+m4({a}) => null; |
+m5({@required a}) => null; |
+m6({a, @required b}) => null; |
'''); |
await computeAnalysisResult(source); |
- assertErrors(source, [HintCode.INVALID_REQUIRED_PARAM]); |
+ assertNoErrors(source); |
verify([source]); |
} |