mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:21:07 +00:00
Initializing ExpectException's name to the empty string instead of null when no name is provided.
Change-Id: I2d9d6cafe3e25b1ecf1a9385405262c557887667 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139325 Reviewed-by: Bob Nystrom <rnystrom@google.com> Commit-Queue: Mark Zhou <markzipan@google.com>
This commit is contained in:
parent
a42efec049
commit
28fb096cfc
|
@ -703,10 +703,10 @@ class ExpectException {
|
|||
final String name;
|
||||
|
||||
ExpectException(this.message)
|
||||
: name = (_getTestName == null) ? null : _getTestName();
|
||||
: name = (_getTestName == null) ? "" : _getTestName();
|
||||
|
||||
String toString() {
|
||||
if (name != null) return 'In test "$name" $message';
|
||||
if (name != "") return 'In test "$name" $message';
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue