Skip to content

Commit 901f356

Browse files
a-wallenCommit Queue
authored andcommitted
chore: add actual vs. expected in error logging message
Closes #56988 GitOrigin-RevId: da1fceb Change-Id: I1bed7fcdfdbf891f3205fb7ffd3e104fa6528cc8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392406 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 1db40b6 commit 901f356

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

pkg/analysis_server/lib/src/g3/fixes.dart

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,17 @@ class LintFixTesterWithSingleFix {
192192
fileEdit.edits,
193193
);
194194
if (actualFixedContent != fixedContent) {
195-
throw StateError('Not expected content:\n$actualFixedContent');
195+
throw StateError('''
196+
Expected the following content:
197+
```
198+
$fixedContent
199+
```
200+
201+
but this was applied instead.
202+
```
203+
$actualFixedContent
204+
```
205+
''');
196206
}
197207
}
198208

0 commit comments

Comments
 (0)