Skip to content

Line info for test_reflective_loader package tests can easily get out of sync #5544

@FMorschel

Description

@FMorschel

From #5529 (comment):

And the current UI, although it does work most of the time, if you add some lines, I've seen them get out of sync (interestingly, the "expect" error labels that show up never do, they're always in the right place) from the method declaration.

I don't know how often this happens, but I'd be interested in an issue for this - because if this happens with those markers, it would also happen to the CodeLens if we switched them over to using the test model data 😔

  1. In Dart SDK, open pkg\analysis_server\test\services\completion\dart\location\dart_doc_test.dart and run all tests.
  2. Add a new line before the first test inside the reflective test class (and wait just a small bit), see that all current checks stay in place while the new line is added:

Image

But interestingly, if you add a new character to any of the assertResponse texts, before the first step, so the output is different:

Image

This is the result. The expected value shows up after the method opening, and the icon to show the test error stays on the line above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions