• Chris Bracken's avatar
    Prefer moreOrLessEquals over closeTo (#64915) · c0ea00ed
    Chris Bracken authored
    Flutter's `moreOrLessEquals` has a few advantages over `closeTo` from
    the `matcher` package:
    
       * It emits the epsilon value in the test result on failure.
       * It uses a named parameter for epsilon, which improves readability
         at the call site.
       * It has a reasonable default for epsilon in cases where something
         more specific isn't required.
    
    Using it also has the nice property that it aids in its own discovery
    when when people go looking for such functionality in new tests.
    
    This change also includes a couple unrelated whitespace formatting cleanups.
    c0ea00ed
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.cirrus.yml Loading commit data...
.codecov.yml Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CODEOWNERS Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
PATENT_GRANT Loading commit data...
README.md Loading commit data...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...