summaryrefslogtreecommitdiff
path: root/test/process
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 11:34:44 -0300
committerGabriel Schneider <[email protected]>2026-11-05 15:15:07 -0300
commit2bd4066a932ec8fc401e4b85e9f8441b17df3cfb (patch)
tree024f6180ed665fbe821e4a4a46e54551e6a0b31e /test/process
parent7ec1181244c039db72986eec46f21a9d5ac2e171 (diff)
downloadpardes-2bd4066a932ec8fc401e4b85e9f8441b17df3cfb.tar.gz
pardes-2bd4066a932ec8fc401e4b85e9f8441b17df3cfb.zip
effects out, Lift and InactiveDim: the core's per-pane lift springs (Pardes.lifts, lift_serials, Region.lift, Chrome.lift_style) and the unfocused panes' recede (draw.zig's dim, its contrast memo and linear blend) go with the words, their settings and tests; the window loses its soft shadows (addSoft, the lift and rim casting, the shadow a sliding pane cast, the contrast ceilings, decor.frag's Gaussian path) and Chrome.sel_fg and sel_bg, which only the ceilings read; a pane closed mid-lift left its spring unsettled and continuous() true for ever, so a window could never go idle (monkey-gui failed `never settled` in the Lift combinations, and passes now); GUI golden 18-mid-transition changes, its sliding pane casting no shadow (the scene leaves with the transitions); root_ctl's out-of-range case is SearchRows', settings' GUI-only case GripWidth's, the window monkey loses its Lift axis
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/process')
-rw-r--r--test/process/window.zig26
1 files changed, 12 insertions, 14 deletions
diff --git a/test/process/window.zig b/test/process/window.zig
index ca91d110..49c2d4f0 100644
--- a/test/process/window.zig
+++ b/test/process/window.zig
@@ -29,14 +29,12 @@ fn paneWith(f: *process.Files, word: []const u8) !u32 {
}
const motions = [_][]const u8{ "off", "crisp", "smooth", "bouncy", "playful" };
-const lifts = [_][]const u8{ "off", "shadow", "rim", "auto" };
const themes = [_][]const u8{ "lapis", "lapis_plain", "forge", "acme", "dusk", "daybreak" };
-/// test/gui_monkey.py's: each Motion x Lift gets a random burst, then
-/// must settle with its process alive and no crash record. Two
-/// combinations and 30 steps in process-test; PARDES_GUI_MONKEY=all runs
-/// all 20 (`zig build monkey-gui`), PARDES_GUI_MONKEY_SEED and _STEPS
-/// choose the rest.
+/// test/gui_monkey.py's: each Motion gets a random burst, then must
+/// settle with its process alive and no crash record. Two of them and 30
+/// steps in process-test; PARDES_GUI_MONKEY=all runs all 5 (`zig build
+/// monkey-gui`), PARDES_GUI_MONKEY_SEED and _STEPS choose the rest.
fn monkey(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try process.only(.gui);
const all = std.mem.eql(u8, envOr("PARDES_GUI_MONKEY", ""), "all");
@@ -44,20 +42,20 @@ fn monkey(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
const steps = try std.fmt.parseInt(usize, envOr("PARDES_GUI_MONKEY_STEPS", if (all) "60" else "30"), 10);
var failed: usize = 0;
var n: usize = 0;
- for (motions) |m| for (lifts) |l| {
+ for (motions) |m| {
defer n += 1;
- // The smoke run: the quietest combination and the busiest.
- if (!all and n != 0 and n != motions.len * lifts.len - 1) continue;
- if (!try monkeyOne(gpa, exe, m, l, seed * 1000 + n, steps)) failed += 1;
- };
+ // The smoke run: the quietest and the busiest.
+ if (!all and n != 0 and n != motions.len - 1) continue;
+ if (!try monkeyOne(gpa, exe, m, seed * 1000 + n, steps)) failed += 1;
+ }
if (failed > 0) return error.MonkeyFailed;
}
-fn monkeyOne(gpa: std.mem.Allocator, exe: [:0]const u8, motion: []const u8, lift: []const u8, seed: u64, steps: usize) !bool {
+fn monkeyOne(gpa: std.mem.Allocator, exe: [:0]const u8, motion: []const u8, seed: u64, steps: usize) !bool {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- const init = try std.fmt.allocPrint(a, "Shell /bin/sh\nMessageLinger 0\nMotion {s}\nLift {s}\nPanelSlide\n", .{ motion, lift });
+ const init = try std.fmt.allocPrint(a, "Shell /bin/sh\nMessageLinger 0\nMotion {s}\nPanelSlide\n", .{motion});
var d = try process.Detached.start(gpa, exe, "monkey", .{ .init = init, .grid = .{ 80, 28 }, .env = &.{
.{ "PARDES_TEST_CLOCK", "1" }, .{ "PARDES_TEST_PAD", "0" },
} });
@@ -101,7 +99,7 @@ fn monkeyOne(gpa: std.mem.Allocator, exe: [:0]const u8, motion: []const u8, lift
};
} else |_| {}
const ok = std.mem.eql(u8, verdict, "ok");
- if (!ok) std.debug.print("monkey {s}-{s} (seed {d}): {s}\n{s}", .{ motion, lift, seed, verdict, log.items });
+ if (!ok) std.debug.print("monkey {s} (seed {d}): {s}\n{s}", .{ motion, seed, verdict, log.items });
return ok;
}