diff options
Diffstat (limited to 'core/Trail.zig')
| -rw-r--r-- | core/Trail.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/Trail.zig b/core/Trail.zig index 96d505ae..aec320f7 100644 --- a/core/Trail.zig +++ b/core/Trail.zig @@ -998,7 +998,7 @@ test "a step whose tag would take a row its column cannot give folds to its newe try std.testing.expect(std.mem.indexOf(u8, tag, "…") == null and std.mem.indexOf(u8, tag, full) != null); } -test "a band on a walked reading pane keeps it a body of 60 %: the layout's floor counts its tag at rest whole, as the sync after it keeps it (a pane the layout has given its width and not yet its height is never cut)" { +test "a band on a walked reading pane is whole: the layout's floor counts its tag at rest whole, as the sync after it keeps it (a pane the layout has given its width and not yet its height is never cut)" { var f: Fixture = .{ .p = undefined, .tmp = undefined }; try f.init(60); defer f.deinit(); @@ -1030,9 +1030,11 @@ test "a band on a walked reading pane keeps it a body of 60 %: the layout's floo p.sync(); for ([_]u21{ ' ', '?', 'q', 'q', 'x', 'q' }) |key| p.update(.{ .key = .{ .cp = key, .text = &[_]u8{@intCast(key)} } }); p.sync(); - try std.testing.expect(pane.band_rows > 0); - const at = v.rects[r]; - try std.testing.expect((at.h - pane.tag_rows) * 5 >= at.h * 3); + const at = pardes.Band.covered(p, pane, r); + try std.testing.expect(at.band > 0); + try std.testing.expectEqual(pardes.Band.takes(p, r), at.band); + try std.testing.expectEqual(layout.wantedTagRows(p, r), pane.tag_rows); + try std.testing.expect(v.rects[r].h >= @max(pane.tag_rows, at.text + at.band)); p.update(.{ .key = .{ .cp = pardes.Key.escape } }); p.sync(); try std.testing.expect(pardes.TagState.hostOf(p) == null); |
