blob: 87f1a153a3b3c7af9bea6b1998cea01a01cbff05 [file] [log] [blame]
// Copyright 2019 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'testing/font_loader.dart';
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
final defaultReportTestException = reportTestException;
reportTestException = (details, testDescription) {
defaultReportTestException(details, testDescription);
stdout.writeln(
'\nThe golden tests failed. Please read test_goldens/README.md for how '
'to update them.',
);
};
TestWidgetsFlutterBinding.ensureInitialized();
await loadFonts();
await testMain();
}