apply upcomming prefer_const_declarations (#15498)

This commit is contained in:
Alexandre Ardhuin
2018-03-14 06:24:49 +01:00
committed by GitHub
parent 7b8c79634d
commit 7667db6362
35 changed files with 84 additions and 84 deletions

View File

@@ -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);
}

View File

@@ -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)));
});
});