Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 419c9c2

Browse files
committed
Fix tests
1 parent af15f05 commit 419c9c2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/ui/hooks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ _LocaleClosure _getLocaleClosure() => _localeClosure;
5050
@pragma('vm:entry-point')
5151
void _updateLocales(List<String> locales) {
5252
final int stringsPerLocale = 4;
53-
int numLocales = (locales.length / stringsPerLocale).toInt();
53+
int numLocales = locales.length ~/ stringsPerLocale;
5454
window._locales = new List<Locale>(numLocales);
5555
for (int localeIndex = 0; localeIndex < numLocales; localeIndex++) {
5656
window._locales[localeIndex] = new Locale(locales[localeIndex * stringsPerLocale],

testing/dart/window_hooks_integration_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void main() {
100100
};
101101
});
102102

103-
_updateLocale('en', 'US', '', '');
103+
_updateLocales(<String>['en', 'US', '', '']);
104104
expect(runZone, isNotNull);
105105
expect(runZone, same(innerZone));
106106
expect(locale, equals(const Locale('en', 'US')));

0 commit comments

Comments
 (0)