Skip to content

Some typos in pattern tests #1653

@chloestefantsova

Description

@chloestefantsova

Here are some more places in the tests that seem to need small corrections.


var {c1: a1, c2: b1} = {c1: 1, c2: 2};
Expect.equals(2, a1);

Here the variable is initialized to 1, but its value is checked against 2.


case {2: final b}:
b.substring(0);

Expect.equals("{2: true}", testMap1({2: true}));

Here a boolean variable is captured by a variable pattern in a variable of type dynamic, and then the .substring method is invoked on it, resulting in a runtime error.


return "(<int>$g, final $h)";

Expect.equals("(<int>0, final false)", test1((0, false)));

Here it seems just an extra space was added in line 56 before the word final.


return "[<String>$e, <bool>$f]";

Expect.equals("(<String>y, <bool>false)", test1(["y", false]));

Here it seems that parentheses in line 102 should be replaced with square brackets.

Metadata

Metadata

Assignees

Labels

bad-testReport tests in need of updates. When closed, the tests should be considered good

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions