• Andrew Kolos's avatar
    give `throwsToolExit` a more useful description (#136694) · 1328997b
    Andrew Kolos authored
    Fixes https://github.com/flutter/flutter/issues/136698.
    
    Alters how `throwToolExit` creates its matcher. This results is an improved description of the matcher.
    
    The mismatch description isn't improved by this, but I writing an entirely custom matcher to fix this isn't ideal either. We can instead mitigate the issue by augmenting the `toString` implementation of `ToolExit` to include the exit code, if it is non-null.
    
    With these changes, the first few lines of output from a test would look like this:
    
    ```
    Expected: throws <Instance of 'ToolExit'> with `exitCode`: <42> and `message`: contains 'message'
      Actual: <Closure: () => Never>
       Which: threw ToolExit:<Exit code: 41232. Error: message>
    ```
    1328997b
Name
Last commit
Last update
.github Loading commit data...
.vscode Loading commit data...
bin Loading commit data...
dev Loading commit data...
examples Loading commit data...
packages Loading commit data...
.ci.yaml 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...
TESTOWNERS Loading commit data...
analysis_options.yaml Loading commit data...
dartdoc_options.yaml Loading commit data...
flutter_console.bat Loading commit data...