[flutter] replace 'checked mode' with 'debug mode' (#87408)

This commit is contained in:
Jonah Williams
2021-08-03 13:25:05 -07:00
committed by GitHub
parent 6f9de0a919
commit 0d3b44e835
17 changed files with 58 additions and 32 deletions

View File

@@ -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() {

View File

@@ -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();