Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LanguageFeatures/Patterns/object_A01_t02 #1635

Closed
alexmarkov opened this issue Jan 3, 2023 · 1 comment
Closed

LanguageFeatures/Patterns/object_A01_t02 #1635

alexmarkov opened this issue Jan 3, 2023 · 1 comment
Assignees
Labels
bad-test Report tests in need of updates. When closed, the tests should be considered good

Comments

@alexmarkov
Copy link

This test incorrectly expects Circle(3).areaAsNullable.toStringAsFixed(2) to be 42, but it is 28.26:

Expect.equals("null-assert = 42", test(Circle(3)));

case Circle(sizeAsInt: 3, areaAsNullable: var b1!):
return "null-assert = ${b1.toStringAsFixed(2)}";

num? get areaAsNullable => areaAsDouble;

double get areaAsDouble => 3.14 * radius * radius;

@alexmarkov
Copy link
Author

Also in LanguageFeatures/Patterns/object_A01_t03:

Expect.equals("null-assert = 42", test(Circle(3)));

if (shape case Circle(sizeAsInt: 3, areaAsNullable: var b1!)) {
return "null-assert = ${b1.toStringAsFixed(2)}";

@sgrekhov sgrekhov self-assigned this Jan 4, 2023
@sgrekhov sgrekhov added the bad-test Report tests in need of updates. When closed, the tests should be considered good label Jan 4, 2023
sgrekhov added a commit to sgrekhov/co19 that referenced this issue Jan 4, 2023
@eernstg eernstg closed this as completed in a84d9c0 Jan 4, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Jan 10, 2023
2023-01-07 [email protected] Update test for `CONTINUE_LABEL_INVALID` (dart-lang/co19#1685)
2023-01-06 [email protected] Fixes dart-lang/co19#1653. Typos fixed in some patterns tests (dart-lang/co19#1667)
2023-01-06 [email protected] Fixes dart-lang/co19#1645. Fix typo in constant_A03_t02.dart test (dart-lang/co19#1649)
2023-01-06 [email protected] Fixes dart-lang/co19#1654. Replace || and && by | and & in negative tests (dart-lang/co19#1668)
2023-01-06 [email protected] Fixes dart-lang/co19#1655. Fix using of wrong type in list_A01_t04.dart (dart-lang/co19#1669)
2023-01-06 [email protected] Fixes dart-lang/co19#1656. Fix a typo in list_A02_t01.dart (dart-lang/co19#1670)
2023-01-06 [email protected] Fixes dart-lang/co19#1657. Don't try to test null-check pattern in irrefutable context (dart-lang/co19#1671)
2023-01-06 [email protected] Fixes dart-lang/co19#1658. Fix typos in list_A05_t06.dart (dart-lang/co19#1672)
2023-01-06 [email protected] Fixes dart-lang/co19#1659. Fix typo in logical_or_A02_t01.dart (dart-lang/co19#1673)
2023-01-06 [email protected] Fixes dart-lang/co19#1660. Fix missed compile-time error in logical_or_A04_t03.dart (dart-lang/co19#1674)
2023-01-06 [email protected] Fixes dart-lang/co19#1661. Fix logical_or_A05_t02.dart. Add missed constant (dart-lang/co19#1675)
2023-01-06 [email protected] Fixes dart-lang/co19#1662. Fix errors in map_A01_t04.dart (dart-lang/co19#1676)
2023-01-06 [email protected] Fixes dart-lang/co19#1663. map_A08_t01.dart. Don't use constants in irrefutable context (dart-lang/co19#1677)
2023-01-06 [email protected] Fixes dart-lang/co19#1664. Fix object pattern with parenthesized subpattern (dart-lang/co19#1678)
2023-01-06 [email protected] Fixes dart-lang/co19#1665. object_A06_t01.dart. Add records experimental flag (dart-lang/co19#1679)
2023-01-06 [email protected] Fixes dart-lang/co19#1666. pattern_assignment_A01_t01.dart. Use dynamic instead of Record class (dart-lang/co19#1680)
2023-01-05 [email protected] dart-lang/co19#1401. [Patterns] Switch expression tests (dart-lang/co19#1633)
2023-01-05 [email protected] Fixes dart-lang/co19#1644. Use constant object expression in relational pattern tests (dart-lang/co19#1648)
2023-01-05 [email protected] Fixes dart-lang/co19#1646. Fix typo in constant_A03_t05.dart test (dart-lang/co19#1650)
2023-01-05 [email protected] Fixes dart-lang/co19#1647. Fix typos in variable names in variable_A02_t05.dart test (dart-lang/co19#1651)
2023-01-04 [email protected] Fixes dart-lang/co19#1628. [Patterns] Type argument added to fix map pattern tests (dart-lang/co19#1638)
2023-01-04 [email protected] Fixes dart-lang/co19#1629. [Patterns] Fix logical_and_A03_t02.dart test (dart-lang/co19#1639)
2023-01-04 [email protected] Fixes dart-lang/co19#1634. Fix typo in Records/metadata_annotations_A01_t04.dart (dart-lang/co19#1640)
2023-01-04 [email protected] Fixes dart-lang/co19#1635. Fix typos in object pattern tests (dart-lang/co19#1641)
2023-01-04 [email protected] Fixes dart-lang/co19#1636. Missed `records` experimental flag added to some patterns tests (dart-lang/co19#1642)
2023-01-04 [email protected] Fixes dart-lang/co19#1637. Missed 'const' keywords added to some patterns tests (dart-lang/co19#1643)
2023-01-03 [email protected] Fixes dart-lang/co19#1629. [Patterns] Fix logical_and_A01_t02.dart test (dart-lang/co19#1631)
2023-01-03 [email protected] dart-lang/co19#1627. [Patterns] Typos in constant pattern tests fixed (dart-lang/co19#1630)
2023-01-03 [email protected] Fixes dart-lang/co19#1628. [Patterns] Type argument added to fix list pattern tests (dart-lang/co19#1632)
2022-12-30 [email protected] dart-lang/co19#1401. [Patterns] Switch statement tests (dart-lang/co19#1624)
2022-12-30 [email protected] Fixes dart-lang/co19#1625. Records experimental flag added (dart-lang/co19#1626)
2022-12-28 [email protected] dart-lang/co19#1401. [Patterns] More wildcards tests added (dart-lang/co19#1549)
2022-12-28 [email protected] Fixes dart-lang/co19#1620. Small fixes in patterns tests (dart-lang/co19#1623)
2022-12-28 [email protected] dart-lang/co19#1401. [Patterns] Pattern assignment tests (dart-lang/co19#1617)
2022-12-27 [email protected] Fixes dart-lang/co19#1619. Typos in records tests fixed (dart-lang/co19#1622)
2022-12-27 [email protected] Fixes dart-lang/co19#1618. Map pattern tests fixed, new one added (dart-lang/co19#1621)

Change-Id: I3e8f23d1d842e77481ea2edb2027689a0135afdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278511
Reviewed-by: Alexander Thomas <[email protected]>
Commit-Queue: Alexander Thomas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad-test Report tests in need of updates. When closed, the tests should be considered good
Projects
None yet
Development

No branches or pull requests

2 participants