Skip to content

Commit 474c9fe

Browse files
nshahanCommit Queue
authored andcommitted
[reload_test] Update signature of the default hotReload()
- Make the signature consistent across all implementations. - Correct some typos. Change-Id: Ida6f2f1da940d71eb4160388eb0df5ddce4f7aa2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389582 Reviewed-by: Sigmund Cherem <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]>
1 parent ddd4f08 commit 474c9fe

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

pkg/dev_compiler/test/hot_reload_suite.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Future<void> main(List<String> args) async {
426426
}
427427

428428
// Skip this test directory if this platform is excluded.
429-
if (testConfig.excludedPlaforms.contains(runtimePlatform)) {
429+
if (testConfig.excludedPlatforms.contains(runtimePlatform)) {
430430
_print('Skipping test on platform: ${runtimePlatform.text}',
431431
label: testName);
432432
continue;

pkg/reload_test/lib/frontend_server_controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum FrontendServerState {
4545
finished,
4646
}
4747

48-
/// Controls and synchronizes the Frontend Server during hot reloaad tests.
48+
/// Controls and synchronizes the Frontend Server during hot reload tests.
4949
///
5050
/// The Frontend Server accepts the following instructions:
5151
///

pkg/reload_test/lib/src/_reload_utils_api.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ void hotRestart() => throw Exception('Not implemented on this platform.');
1212
int get hotReloadGeneration =>
1313
throw Exception('Not implemented on this platform.');
1414

15-
void hotReload() => throw Exception('Not implemented on this platform.');
15+
Future<void> hotReload() =>
16+
throw Exception('Not implemented on this platform.');

pkg/reload_test/lib/test_helpers.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,28 @@ enum RuntimePlatforms {
6868
/// }
6969
class ReloadTestConfiguration {
7070
final Map<String, dynamic> _values;
71-
final Set<RuntimePlatforms> excludedPlaforms;
71+
final Set<RuntimePlatforms> excludedPlatforms;
7272
final String? expectedError;
7373

7474
ReloadTestConfiguration._(
75-
this._values, this.excludedPlaforms, this.expectedError);
75+
this._values, this.excludedPlatforms, this.expectedError);
7676

7777
factory ReloadTestConfiguration() => ReloadTestConfiguration._(
7878
const <String, dynamic>{}, <RuntimePlatforms>{}, null);
7979

8080
factory ReloadTestConfiguration.fromJsonFile(Uri file) {
8181
final Map<String, dynamic> jsonData =
8282
jsonDecode(File.fromUri(file).readAsStringSync());
83-
final excludedPlaforms = <RuntimePlatforms>{};
83+
final excludedPlatforms = <RuntimePlatforms>{};
8484
var rawExcludedPlatforms = jsonData['exclude'];
8585
if (rawExcludedPlatforms != null) {
8686
for (final String platform in rawExcludedPlatforms) {
8787
final runtimePlatform = RuntimePlatforms.values.byName(platform);
88-
excludedPlaforms.add(runtimePlatform);
88+
excludedPlatforms.add(runtimePlatform);
8989
}
9090
}
9191
return ReloadTestConfiguration._(
92-
jsonData, excludedPlaforms, jsonData['expectedError']);
92+
jsonData, excludedPlatforms, jsonData['expectedError']);
9393
}
9494

9595
String toJson() {

0 commit comments

Comments
 (0)