diff options
Diffstat (limited to 'anim/test/recordings.zig')
| -rw-r--r-- | anim/test/recordings.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/anim/test/recordings.zig b/anim/test/recordings.zig index 3634ee9..38798af 100644 --- a/anim/test/recordings.zig +++ b/anim/test/recordings.zig @@ -90,12 +90,14 @@ test "a walked step is as long as what it changed: fire, a slot a level, the hol var frame: anim.Frame = .{ .t = 0, .clock = 0, .in = undefined, .pointer = .{ 0, 0 }, .arena = arena.allocator() }; scene.frame(&frame); const t = canim.theme.time; - // main's line calls fib(5): registers, the stack, the call, 0.30 s - // apart; the call's node when the projection from its way back arrives. + // main's line calls fib(5): its two registers (rdi, rsp) 6 f apart, + // the stack 0.30 s after the second, the call's node when the + // projection from its way back arrives. const from = rec.lineMoment(10, rec.call("main", 0).enter); const call = scene.at.reading(from, rec.next(.line, from)); - try std.testing.expectApproxEqAbs(@as(f32, 2 * t.cascade), call.at[1], 1e-4); - try std.testing.expectApproxEqAbs(@as(f32, 2 * t.cascade + t.project.bracket + t.project.far), call.at[2], 1e-4); + const second: f32 = 6.0 / 60.0; + try std.testing.expectApproxEqAbs(@as(f32, 2 * t.cascade + second), call.at[1], 1e-4); + try std.testing.expectApproxEqAbs(@as(f32, 2 * t.cascade + second + t.project.bracket + t.project.far), call.at[2], 1e-4); try expect(call.total > 2.0 and call.total < 3.5); // A line that changes nothing shown: fire, advance, rest. var quiet = scene.at; |
