dartdev nits- test name and usage of ??

Change-Id: If789777f4e9022a5eafe6214624bc7c6c2726e36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136812
Auto-Submit: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
This commit is contained in:
Jaime Wren 2020-02-24 19:02:46 +00:00 committed by commit-bot@chromium.org
parent c7d7552697
commit fc6ace52c7
2 changed files with 3 additions and 3 deletions

View file

@ -16,7 +16,7 @@ Directory getDartPrefsDirectory() {
String getUserHomeDir() {
String envKey = Platform.operatingSystem == 'windows' ? 'APPDATA' : 'HOME';
String value = Platform.environment[envKey];
return value == null ? '.' : value;
return value ?? '.';
}
/// A typedef to represent a function taking no arguments and with no return

View file

@ -30,8 +30,8 @@ void help() {
});
// For each command description, assert that the values are not empty, don't
// have trailing white space, and end with a period.
test('descriptions formats', () {
// have trailing white space and end with a period.
test('description formatting', () {
DartdevRunner([]).commands.forEach((String commandKey, Command command) {
expect(commandKey, isNotEmpty);
expect(command.description, isNotEmpty);