Skip to content

Commit 9250117

Browse files
committed
test [nfc]: Unmark testFoo functions as async
Discovered while testing out `discarded_futures` for #731. Related: #731
1 parent 343102d commit 9250117

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

test/widgets/emoji_reaction_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ void main() {
146146
for (final emojiset in [Emojiset.text, Emojiset.google]) {
147147
for (final textDirection in TextDirection.values) {
148148
for (final textScaleFactor in kTextScaleFactors) {
149-
Future<void> runSmokeTest(
149+
void runSmokeTest(
150150
String description,
151151
List<Reaction> reactions, {
152152
required List<User> users,
153153
required Map<String, RealmEmojiItem> realmEmoji,
154-
}) async {
154+
}) {
155155
final descriptionDetails = [
156156
displayEmojiReactionUsers ? 'show names when few' : 'no names',
157157
emojiset.name,

test/widgets/text_test.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ void main() {
8888
});
8989

9090
group('weightVariableTextStyle', () {
91-
Future<void> testWeights(
91+
void testWeights(
9292
String description, {
9393
required TextStyle Function(BuildContext context) styleBuilder,
9494
bool platformRequestsBold = false,
9595
required List<FontVariation> expectedFontVariations,
9696
required FontWeight expectedFontWeight,
97-
}) async {
97+
}) {
9898
testWidgets(description, (tester) async {
9999
addTearDown(testBinding.reset);
100100
tester.platformDispatcher.accessibilityFeaturesTestValue =
@@ -179,13 +179,13 @@ void main() {
179179
});
180180

181181
group('bolderWghtTextStyle', () {
182-
Future<void> testBolderWghtTextStyle(
182+
void testBolderWghtTextStyle(
183183
String description, {
184184
required TextStyle Function(BuildContext context) makeStyle,
185185
bool platformRequestsBold = false,
186186
required double expectedWght,
187187
required FontWeight expectedFontWeight,
188-
}) async {
188+
}) {
189189
testWidgets(description, (tester) async {
190190
addTearDown(testBinding.reset);
191191
tester.platformDispatcher.accessibilityFeaturesTestValue =
@@ -340,12 +340,12 @@ void main() {
340340
});
341341

342342
group('proportionalLetterSpacing', () {
343-
Future<void> testLetterSpacing(
343+
void testLetterSpacing(
344344
String description, {
345345
required double Function(BuildContext context) getValue,
346346
double? ambientTextScaleFactor,
347347
required double expected,
348-
}) async {
348+
}) {
349349
testWidgets(description, (tester) async {
350350
addTearDown(testBinding.reset);
351351
if (ambientTextScaleFactor != null) {
@@ -394,7 +394,7 @@ void main() {
394394
});
395395

396396
group('localizedTextBaseline', () {
397-
Future<void> testLocalizedTextBaseline(Locale locale, TextBaseline expected) async {
397+
void testLocalizedTextBaseline(Locale locale, TextBaseline expected) {
398398
testWidgets('gives $expected for $locale', (tester) async {
399399
addTearDown(testBinding.reset);
400400
tester.platformDispatcher.localeTestValue = locale;

test/widgets/theme_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ void main() {
2222
group('button text size and letter spacing', () {
2323
const buttonText = 'Zulip';
2424

25-
Future<void> doCheck(
25+
void doCheck(
2626
String description, {
2727
required Widget button,
2828
double? ambientTextScaleFactor,
29-
}) async {
29+
}) {
3030
testWidgets(description, (tester) async {
3131
addTearDown(testBinding.reset);
3232
if (ambientTextScaleFactor != null) {

0 commit comments

Comments
 (0)