[flutter] replace 'checked mode' with 'debug mode' (#87408)
This commit is contained in:
@@ -951,8 +951,8 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
|
||||
/// This binding controls time, allowing tests to verify long
|
||||
/// animation sequences without having to execute them in real time.
|
||||
///
|
||||
/// This class assumes it is always run in checked mode (since tests are always
|
||||
/// run in checked mode).
|
||||
/// This class assumes it is always run in debug mode (since tests are always
|
||||
/// run in debug mode).
|
||||
class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
|
||||
@override
|
||||
void initInstances() {
|
||||
|
||||
@@ -393,15 +393,15 @@ const String kDebugWarning = '''
|
||||
/// passed to the `callback`, and that handle will automatically be disposed
|
||||
/// after the callback is finished.
|
||||
///
|
||||
/// Benchmarks must not be run in checked mode, because the performance is not
|
||||
/// Benchmarks must not be run in debug mode, because the performance is not
|
||||
/// representative. To avoid this, this function will print a big message if it
|
||||
/// is run in checked mode. Unit tests of this method pass `mayRunWithAsserts`,
|
||||
/// is run in debug mode. Unit tests of this method pass `mayRunWithAsserts`,
|
||||
/// but it should not be used for actual benchmarking.
|
||||
///
|
||||
/// Example:
|
||||
///
|
||||
/// main() async {
|
||||
/// assert(false); // fail in checked mode
|
||||
/// assert(false); // fail in debug mode
|
||||
/// await benchmarkWidgets((WidgetTester tester) async {
|
||||
/// await tester.pumpWidget(MyWidget());
|
||||
/// final Stopwatch timer = Stopwatch()..start();
|
||||
|
||||
Reference in New Issue
Block a user