summaryrefslogtreecommitdiff
path: root/test/consumer/lib.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/consumer/lib.zig')
-rw-r--r--test/consumer/lib.zig10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/consumer/lib.zig b/test/consumer/lib.zig
index 2832bdf1..949afd5c 100644
--- a/test/consumer/lib.zig
+++ b/test/consumer/lib.zig
@@ -140,12 +140,10 @@ test "a diff is a language: its hunks coloured as their file's, its added and re
// a row's hue in a theme: a ground between the page and the theme's green, a stronger and a fainter one
const th = pardes.theme("Orchard").?;
- const g = pardes.Grounds.of(th);
- const ground = g.forStyle(styles[added]).?;
- try std.testing.expectEqual(g.add, ground);
- try std.testing.expectEqual(g.del, g.forStyle(styles[removed]).?);
- try std.testing.expectEqual(null, g.forStyle(@backingInt(pardes.Syn.keyword)));
- try std.testing.expect(!std.mem.eql(u8, &ground.row, &pardes.page(th)) and !std.mem.eql(u8, &ground.row, &ground.emph) and !std.mem.eql(u8, &ground.row, &ground.line));
+ const c = pardes.Chrome.of(th);
+ for ([2]pardes.Chrome.Diff{ c.add, c.del }) |ground|
+ try std.testing.expect(!std.mem.eql(u8, &ground.row, &pardes.page(th)) and !std.mem.eql(u8, &ground.row, &ground.emph) and !std.mem.eql(u8, &ground.row, &ground.line));
+ try std.testing.expect(!std.mem.eql(u8, &c.add.row, &c.del.row));
// what a row points at: the new line a `+` row is
var lines: std.ArrayList([]const u8) = .empty;