Unverified Commit 45ae4f6d authored by Devon Carew's avatar Devon Carew Committed by GitHub

use sentence case in error message titles (#35750)

* use sentence case in error message titles

* add a test
parent b79136ba
...@@ -459,7 +459,7 @@ class FlutterErrorDetails extends Diagnosticable { ...@@ -459,7 +459,7 @@ class FlutterErrorDetails extends Diagnosticable {
@override @override
String toStringShort() { String toStringShort() {
return library != null ? 'Exception Caught By $library' : 'Exception Caught'; return library != null ? 'Exception caught by $library' : 'Exception caught';
} }
@override @override
......
...@@ -122,6 +122,20 @@ void main() { ...@@ -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', () { test('FlutterError default constructor', () {
FlutterError error = FlutterError( FlutterError error = FlutterError(
'My Error Summary.\n' 'My Error Summary.\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment