From 4f36d68b74a2a2808f9e7d7fe4dd03843417cb5f Mon Sep 17 00:00:00 2001 From: gem Date: Tue, 9 Jun 2026 16:04:37 +0800 Subject: [PATCH] Format nine-slice rendering test --- .../rendering/runtime_component_test.dart | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/test/runtime/rendering/runtime_component_test.dart b/test/runtime/rendering/runtime_component_test.dart index fcca967..aec453c 100644 --- a/test/runtime/rendering/runtime_component_test.dart +++ b/test/runtime/rendering/runtime_component_test.dart @@ -300,19 +300,22 @@ void main() { expect(parts.last.source, const Rect.fromLTRB(30.5, 40.5, 39.5, 49.5)); }); - test('keeps tiny nine-slice source rects when inset would collapse them', () { - final parts = runtimeNineSliceRects( - source: const Rect.fromLTWH(0, 0, 3, 3), - destination: const Rect.fromLTWH(0, 0, 30, 30), - sliceLeft: 1, - sliceTop: 1, - sliceRight: 1, - sliceBottom: 1, - sourceInset: 0.5, - ); + test( + 'keeps tiny nine-slice source rects when inset would collapse them', + () { + final parts = runtimeNineSliceRects( + source: const Rect.fromLTWH(0, 0, 3, 3), + destination: const Rect.fromLTWH(0, 0, 30, 30), + sliceLeft: 1, + sliceTop: 1, + sliceRight: 1, + sliceBottom: 1, + sourceInset: 0.5, + ); - expect(parts[4].source, const Rect.fromLTRB(1, 1, 2, 2)); - }); + expect(parts[4].source, const Rect.fromLTRB(1, 1, 2, 2)); + }, + ); test('updates text alpha style without rebuilding text component', () { final component = RuntimeComponent(