Skip to content

ListTest - is copyFrom() really the method we want to test? #1953

Closed
@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


In List tests, there are several references to a method that is not a part of the interface for list:

 try {
      List a = new List(4);
      a.copyFrom(a, null, 1, 1);
    } catch (IllegalArgumentException e) {
      exception_caught = true;
    }

There is an a.setRange() which calls copyFrom.

Now this is perfectly legal, but since it isn't a part of the interface it could change. Also, since the behavior of copyFrom isn't a part o
I would like to annotate this file for static analysis, but use of this method makes it kind of ugly to annotate.

I think the test would be better if it were changed. FYI, we already have a more straightforward test 'FieldDynamicTest' that shows you can reference an undeclared field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).closed-obsoleteClosed as the reported issue is no longer relevant

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions