use sentence case in error message titles (#35750)
* use sentence case in error message titles * add a test
This commit is contained in:
parent
b79136ba5a
commit
45ae4f6dbe
@ -459,7 +459,7 @@ class FlutterErrorDetails extends Diagnosticable {
|
||||
|
||||
@override
|
||||
String toStringShort() {
|
||||
return library != null ? 'Exception Caught By $library' : 'Exception Caught';
|
||||
return library != null ? 'Exception caught by $library' : 'Exception caught';
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -122,6 +122,20 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('FlutterErrorDetails.toStringShort', () {
|
||||
expect(
|
||||
FlutterErrorDetails(
|
||||
exception: 'MESSAGE',
|
||||
library: 'library',
|
||||
context: ErrorDescription('CONTEXTING'),
|
||||
informationCollector: () sync* {
|
||||
yield ErrorDescription('INFO');
|
||||
},
|
||||
).toStringShort(),
|
||||
'Exception caught by library',
|
||||
);
|
||||
});
|
||||
|
||||
test('FlutterError default constructor', () {
|
||||
FlutterError error = FlutterError(
|
||||
'My Error Summary.\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user