Skip to content

Remove checks for assert across testing/dart (dart:ui tests) #155054

@matanlurey

Description

@matanlurey

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.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.engineflutter/engine related. See also e: labels.team-engineOwned by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions