-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
The tests in engine/testing/dart often have conditional checks if assertions are enabled or not:
test('RRect asserts when corner radii are negative', () {
--
381 | bool assertsEnabled = false;
382 | assert(() {
383 | assertsEnabled = true;
384 | return true;
385 | }());However, these tests all use flutter-tester, so the checks don't make sense. Talking to @jason-simmons:
AFAIK Dart assertions are enabled in all use cases of
flutter_tester.The flutter_tester binary that we distribute to the framework is a debug build
(https://github.com/flutter/engine/blob/main/build/archives/BUILD.gn#L87)The engine can use profile/release builds of flutter_tester to run engine unit tests that are written in Dart.
But even in profile/release modes flutter_tester is built with the JIT Dart runtime (not the precompiled runtime).
(https://github.com/flutter/engine/blob/main/shell/testing/BUILD.gn#L39)Use of the JIT runtime should cause the engine to enable assertions when it configures Dart flags.