apply upcomming prefer_const_declarations (#15498)
This commit is contained in:
committed by
GitHub
parent
7b8c79634d
commit
7667db6362
@@ -480,7 +480,7 @@ class ArchivePublisher {
|
||||
jsonData['releases'][revision][branchName] = metadata;
|
||||
|
||||
final File tempFile = new File(path.join(tempDir.absolute.path, 'releases_$platformName.json'));
|
||||
final JsonEncoder encoder = const JsonEncoder.withIndent(' ');
|
||||
const JsonEncoder encoder = const JsonEncoder.withIndent(' ');
|
||||
tempFile.writeAsStringSync(encoder.convert(jsonData));
|
||||
await _cloudCopy(tempFile.absolute.path, metadataGsPath);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import '../prepare_package.dart';
|
||||
import 'fake_process_manager.dart';
|
||||
|
||||
void main() {
|
||||
final String testRef = 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef';
|
||||
const String testRef = 'deadbeefdeadbeefdeadbeefdeadbeefdeadbeef';
|
||||
test('Throws on missing executable', () async {
|
||||
// Uses a *real* process manager, since we want to know what happens if
|
||||
// it can't find an executable.
|
||||
@@ -295,7 +295,7 @@ void main() {
|
||||
expect(contents, contains('"beta": "6da8ec6bd0c4801b80d666869e4069698561c043"'));
|
||||
// Make sure it's valid JSON, and in the right format.
|
||||
final Map<String, dynamic> jsonData = json.decode(contents);
|
||||
final JsonEncoder encoder = const JsonEncoder.withIndent(' ');
|
||||
const JsonEncoder encoder = const JsonEncoder.withIndent(' ');
|
||||
expect(contents, equals(encoder.convert(jsonData)));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user