Commit a9e37e2
[analyzer] Add warnings to test expectations rather than ignoring.
Konstantin pointed out in
https://dart-review.googlesource.com/c/sdk/+/413521/comment/773e5821_595e0362/
that:
- The cost of including these warnings in test expectations is low,
- Including them has the advantage of including more information in
the test, which is nice, and
- These warnings aren't really a distraction; they are an expected
part of the analyzer's behavior (e.g., when calling a method on
`Never`, we expect a dead code warning, even if the test in question
is ostensibly testing some other behavior). Including the warning as
an expected outcome has the advantage of confirming that the test is
indeed behaving in the way we expect.
Change-Id: Iaa44e80e5332b83d5165e8a362a97dd871d8bf25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413561
Auto-Submit: Paul Berry <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>1 parent b70685e commit a9e37e2
File tree
3 files changed
+26
-20
lines changed- pkg/analyzer/test/src
- dart/resolution
- diagnostics
3 files changed
+26
-20
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
1041 | | - | |
| 1041 | + | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | | - | |
1048 | 1047 | | |
1049 | 1048 | | |
1050 | | - | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1051 | 1052 | | |
1052 | 1053 | | |
1053 | 1054 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | 174 | | |
176 | 175 | | |
177 | | - | |
| 176 | + | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
Lines changed: 20 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
| 890 | + | |
891 | 891 | | |
892 | | - | |
893 | 892 | | |
894 | 893 | | |
895 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
896 | 897 | | |
897 | 898 | | |
898 | 899 | | |
| |||
915 | 916 | | |
916 | 917 | | |
917 | 918 | | |
918 | | - | |
| 919 | + | |
919 | 920 | | |
920 | | - | |
921 | 921 | | |
922 | 922 | | |
923 | | - | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
924 | 926 | | |
925 | 927 | | |
926 | 928 | | |
| |||
987 | 989 | | |
988 | 990 | | |
989 | 991 | | |
990 | | - | |
| 992 | + | |
991 | 993 | | |
992 | | - | |
993 | 994 | | |
994 | 995 | | |
995 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
996 | 999 | | |
997 | 1000 | | |
998 | 1001 | | |
| |||
1143 | 1146 | | |
1144 | 1147 | | |
1145 | 1148 | | |
1146 | | - | |
| 1149 | + | |
1147 | 1150 | | |
1148 | | - | |
1149 | 1151 | | |
1150 | 1152 | | |
1151 | | - | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
1152 | 1156 | | |
1153 | 1157 | | |
1154 | 1158 | | |
| |||
1173 | 1177 | | |
1174 | 1178 | | |
1175 | 1179 | | |
1176 | | - | |
| 1180 | + | |
1177 | 1181 | | |
1178 | | - | |
1179 | 1182 | | |
1180 | 1183 | | |
1181 | | - | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1182 | 1187 | | |
1183 | 1188 | | |
1184 | 1189 | | |
| |||
0 commit comments