add: necessary assert statement; rem: unnecessary render resize in testing

This commit is contained in:
2025-05-28 14:40:25 +02:00
parent 4cc749facc
commit 3cb0d11e71
2 changed files with 1 additions and 1 deletions

View File

@@ -203,6 +203,7 @@ pub fn Scrollable(Event: type) type {
fn content(ctx: *anyopaque, cells: []Cell, size: Point) !void {
const this: *@This() = @ptrCast(@alignCast(ctx));
assert(cells.len == @as(usize, size.x) * @as(usize, size.y));
assert(cells.len == @as(usize, this.size.x) * @as(usize, this.size.y));
const offset_x: usize = if (this.configuration.x_axis) 1 else 0;
const offset_y: usize = if (this.configuration.y_axis) 1 else 0;

View File

@@ -109,7 +109,6 @@ pub fn expectContainerScreen(size: Point, container: *Container(event.SystemEven
var renderer: Renderer = .init(allocator, size);
defer renderer.deinit();
try renderer.resize(size);
container.resize(size);
container.reposition(.{});
try renderer.render(Container(event.SystemEvent), container);