From 78b7fad527549cf40ce052e8a0c1d84e5e90b17e Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Wed, 22 Oct 2025 11:00:07 -0700 Subject: [PATCH] test [nfc]: Unmark testFoo functions as async Discovered while testing out `discarded_futures` for #731. Related: #731 --- test/widgets/emoji_reaction_test.dart | 4 ++-- test/widgets/text_test.dart | 14 +++++++------- test/widgets/theme_test.dart | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/widgets/emoji_reaction_test.dart b/test/widgets/emoji_reaction_test.dart index d50b7c8d7b..72ccac41a0 100644 --- a/test/widgets/emoji_reaction_test.dart +++ b/test/widgets/emoji_reaction_test.dart @@ -146,12 +146,12 @@ void main() { for (final emojiset in [Emojiset.text, Emojiset.google]) { for (final textDirection in TextDirection.values) { for (final textScaleFactor in kTextScaleFactors) { - Future runSmokeTest( + void runSmokeTest( String description, List reactions, { required List users, required Map realmEmoji, - }) async { + }) { final descriptionDetails = [ displayEmojiReactionUsers ? 'show names when few' : 'no names', emojiset.name, diff --git a/test/widgets/text_test.dart b/test/widgets/text_test.dart index 030b78ef59..e3f849dfc3 100644 --- a/test/widgets/text_test.dart +++ b/test/widgets/text_test.dart @@ -88,13 +88,13 @@ void main() { }); group('weightVariableTextStyle', () { - Future testWeights( + void testWeights( String description, { required TextStyle Function(BuildContext context) styleBuilder, bool platformRequestsBold = false, required List expectedFontVariations, required FontWeight expectedFontWeight, - }) async { + }) { testWidgets(description, (tester) async { addTearDown(testBinding.reset); tester.platformDispatcher.accessibilityFeaturesTestValue = @@ -179,13 +179,13 @@ void main() { }); group('bolderWghtTextStyle', () { - Future testBolderWghtTextStyle( + void testBolderWghtTextStyle( String description, { required TextStyle Function(BuildContext context) makeStyle, bool platformRequestsBold = false, required double expectedWght, required FontWeight expectedFontWeight, - }) async { + }) { testWidgets(description, (tester) async { addTearDown(testBinding.reset); tester.platformDispatcher.accessibilityFeaturesTestValue = @@ -340,12 +340,12 @@ void main() { }); group('proportionalLetterSpacing', () { - Future testLetterSpacing( + void testLetterSpacing( String description, { required double Function(BuildContext context) getValue, double? ambientTextScaleFactor, required double expected, - }) async { + }) { testWidgets(description, (tester) async { addTearDown(testBinding.reset); if (ambientTextScaleFactor != null) { @@ -394,7 +394,7 @@ void main() { }); group('localizedTextBaseline', () { - Future testLocalizedTextBaseline(Locale locale, TextBaseline expected) async { + void testLocalizedTextBaseline(Locale locale, TextBaseline expected) { testWidgets('gives $expected for $locale', (tester) async { addTearDown(testBinding.reset); tester.platformDispatcher.localeTestValue = locale; diff --git a/test/widgets/theme_test.dart b/test/widgets/theme_test.dart index 678736767d..95dc49f2c9 100644 --- a/test/widgets/theme_test.dart +++ b/test/widgets/theme_test.dart @@ -22,11 +22,11 @@ void main() { group('button text size and letter spacing', () { const buttonText = 'Zulip'; - Future doCheck( + void doCheck( String description, { required Widget button, double? ambientTextScaleFactor, - }) async { + }) { testWidgets(description, (tester) async { addTearDown(testBinding.reset); if (ambientTextScaleFactor != null) {