flutter/packages/flutter_tools/test/integration.shard/debug_adapter
Andrew Kolos 1328997b08
give throwsToolExit a more useful description (#136694)
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>
```
2023-10-27 06:18:17 +00:00
..
flutter_adapter_test.dart give throwsToolExit a more useful description (#136694) 2023-10-27 06:18:17 +00:00
test_adapter_test.dart Roll dds dependency to 2.8.3 for expression evaluation upcoming fixes. (#128124) 2023-06-02 23:31:07 +00:00
test_client.dart [flutter_tools/dap] Improve rendering of structured errors via DAP (#131251) 2023-07-31 13:03:26 +01:00
test_server.dart Enable strict-inference (#135043) 2023-09-20 19:59:08 +00:00
test_support.dart [flutter_tools/dap] Improve rendering of structured errors via DAP (#131251) 2023-07-31 13:03:26 +01:00