There are several blatant bugs in TestSemantics that we should fix:
1. Comparison of locales
This line in TestSemantics is useless; it compares a value to itself:
|
(second[i] as LocaleStringAttribute).locale != |
|
(second[i] as LocaleStringAttribute).locale)) { |
Instead, it should compare with (first[i] as LocaleStringAttribute).locale.
2. Comparison of controlNodes
Another instance of comparing something to itself:
|
if (controlsNodes != controlsNodes && !setEquals(controlsNodes, node.controlsNodes)) { |
3. Random comma in an assert
This comma appears to be a typo. It puts part of the logic into the error message field 🤔 .
|
inputType != null, |
|
minValue != null || maxValue != null, |
|
); |
These bugs may exist in several places. For example, PR #185736 is copying TestSemantics into the Material library. We should search for all instances of TestSemantics and fix it everywhere.
There are several blatant bugs in TestSemantics that we should fix:
1. Comparison of locales
This line in TestSemantics is useless; it compares a value to itself:
flutter/packages/flutter/test/widgets/semantics_tester.dart
Lines 718 to 719 in 03e6adf
Instead, it should compare with
(first[i] as LocaleStringAttribute).locale.2. Comparison of controlNodes
Another instance of comparing something to itself:
flutter/packages/flutter/test/widgets/semantics_tester.dart
Line 511 in 03e6adf
3. Random comma in an assert
This comma appears to be a typo. It puts part of the logic into the error message field 🤔 .
flutter/packages/flutter/test/widgets/semantics_tester.dart
Lines 1183 to 1185 in 03e6adf
These bugs may exist in several places. For example, PR #185736 is copying TestSemantics into the Material library. We should search for all instances of TestSemantics and fix it everywhere.