add: necessary assert statement; rem: unnecessary render resize in testing
This commit is contained in:
@@ -203,6 +203,7 @@ pub fn Scrollable(Event: type) type {
|
|||||||
|
|
||||||
fn content(ctx: *anyopaque, cells: []Cell, size: Point) !void {
|
fn content(ctx: *anyopaque, cells: []Cell, size: Point) !void {
|
||||||
const this: *@This() = @ptrCast(@alignCast(ctx));
|
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));
|
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_x: usize = if (this.configuration.x_axis) 1 else 0;
|
||||||
const offset_y: usize = if (this.configuration.y_axis) 1 else 0;
|
const offset_y: usize = if (this.configuration.y_axis) 1 else 0;
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ pub fn expectContainerScreen(size: Point, container: *Container(event.SystemEven
|
|||||||
var renderer: Renderer = .init(allocator, size);
|
var renderer: Renderer = .init(allocator, size);
|
||||||
defer renderer.deinit();
|
defer renderer.deinit();
|
||||||
|
|
||||||
try renderer.resize(size);
|
|
||||||
container.resize(size);
|
container.resize(size);
|
||||||
container.reposition(.{});
|
container.reposition(.{});
|
||||||
try renderer.render(Container(event.SystemEvent), container);
|
try renderer.render(Container(event.SystemEvent), container);
|
||||||
|
|||||||
Reference in New Issue
Block a user