Format nine-slice rendering test
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user