Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: pkg/analyzer/test/generated/hint_code_test.dart

Issue 2933753002: Run the sorter to reduce code churn (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/gn_test.dart ('k') | pkg/analyzer/test/generated/parser_fasta_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
}
« no previous file with comments | « pkg/analyzer/test/generated/gn_test.dart ('k') | pkg/analyzer/test/generated/parser_fasta_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698