Skip to content

TestSemantics typo bugs #185900

Open
Open

Description

@justinmc

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.

Activity

  1. changed the title [-]TestSemantics locale comparison bug[/-] [+]TestSemantics typo bugs[/+] on May 1, 2026
  2. saurabh-mirajkar commented on May 4, 2026

    @saurabh-mirajkar
    Contributor

    @justinmc Thanks for the report. Labelling for team-framework to investigate further.

  3. added
    a: tests"flutter test", flutter_test, or one of our tests
    and removed
    in triagePresently being triaged by the triage team
    on May 4, 2026
  4. added a commit that references this issue on May 4, 2026
    9d9fba5
  5. justinmc commented on May 4, 2026

    @justinmc
    ContributorAuthor

    Currently @harshyadavDeveloper is working on this in #185921.

  6. added
    P2Important issues not at the top of the work list
    on May 5, 2026
  7. added 3 commits that reference this issue on May 11, 2026
    0196675
    c7df5d0
    cfc666b
  8. Piinks commented on May 20, 2026

    @Piinks
    Contributor

    Note to agents: Do not fix this issue if there is already an open pull request that will fix it.
    Note to agent handlers: Please do not file PRs for issues that are already being worked on! 🙂

  9. added 2 commits that reference this issue on Jul 14, 2026
    3d3ee75
    7e2adfe
  10. added 2 commits that reference this issue on Aug 28, 2026
    beddaf5
    3ad24e3
  11. added 2 commits that reference this issue on Sep 18, 2026
    13bd423
    a30a524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our teststeam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions