diff options
Diffstat (limited to 'anim/test')
| -rw-r--r-- | anim/test/gallery/atoms.png | bin | 104822 -> 104943 bytes | |||
| -rw-r--r-- | anim/test/gallery/graph-map.png | bin | 158401 -> 158281 bytes | |||
| -rw-r--r-- | anim/test/gallery/graph.png | bin | 76868 -> 76747 bytes | |||
| -rw-r--r-- | anim/test/gallery/loupe.png | bin | 237479 -> 237134 bytes | |||
| -rw-r--r-- | anim/test/gallery/none.png | bin | 226735 -> 227070 bytes | |||
| -rw-r--r-- | anim/test/gallery/rest.png | bin | 233721 -> 232355 bytes | |||
| -rw-r--r-- | anim/test/gallery/rows.png | bin | 140530 -> 140426 bytes | |||
| -rw-r--r-- | anim/test/gallery/step.png | bin | 232385 -> 231441 bytes | |||
| -rw-r--r-- | anim/test/gallery/subject.png | bin | 210007 -> 210027 bytes | |||
| -rw-r--r-- | anim/test/musl.script | 9 | ||||
| -rw-r--r-- | anim/test/recordings.zig | 18 |
11 files changed, 27 insertions, 0 deletions
diff --git a/anim/test/gallery/atoms.png b/anim/test/gallery/atoms.png Binary files differindex 8da5c01..acd54a8 100644 --- a/anim/test/gallery/atoms.png +++ b/anim/test/gallery/atoms.png diff --git a/anim/test/gallery/graph-map.png b/anim/test/gallery/graph-map.png Binary files differindex b16caf6..951d4af 100644 --- a/anim/test/gallery/graph-map.png +++ b/anim/test/gallery/graph-map.png diff --git a/anim/test/gallery/graph.png b/anim/test/gallery/graph.png Binary files differindex ea9695e..d43db42 100644 --- a/anim/test/gallery/graph.png +++ b/anim/test/gallery/graph.png diff --git a/anim/test/gallery/loupe.png b/anim/test/gallery/loupe.png Binary files differindex 7f07d94..52bc89a 100644 --- a/anim/test/gallery/loupe.png +++ b/anim/test/gallery/loupe.png diff --git a/anim/test/gallery/none.png b/anim/test/gallery/none.png Binary files differindex bac000d..4e4d5b1 100644 --- a/anim/test/gallery/none.png +++ b/anim/test/gallery/none.png diff --git a/anim/test/gallery/rest.png b/anim/test/gallery/rest.png Binary files differindex c368a30..205fc0d 100644 --- a/anim/test/gallery/rest.png +++ b/anim/test/gallery/rest.png diff --git a/anim/test/gallery/rows.png b/anim/test/gallery/rows.png Binary files differindex dd85690..4d936ab 100644 --- a/anim/test/gallery/rows.png +++ b/anim/test/gallery/rows.png diff --git a/anim/test/gallery/step.png b/anim/test/gallery/step.png Binary files differindex 19ffc00..5ccb082 100644 --- a/anim/test/gallery/step.png +++ b/anim/test/gallery/step.png diff --git a/anim/test/gallery/subject.png b/anim/test/gallery/subject.png Binary files differindex 182f8ba..9e36a1d 100644 --- a/anim/test/gallery/subject.png +++ b/anim/test/gallery/subject.png diff --git a/anim/test/musl.script b/anim/test/musl.script new file mode 100644 index 0000000..742770b --- /dev/null +++ b/anim/test/musl.script @@ -0,0 +1,9 @@ +# The musl scene, headless: it runs to three instants of its timeline without failing. +frames 2 +console set playing false +console set t 5 +screenshot .zig-cache/canim/musl-early.png +console set t 14 +screenshot .zig-cache/canim/musl-mid.png +console set t 999 +screenshot .zig-cache/canim/musl-end.png diff --git a/anim/test/recordings.zig b/anim/test/recordings.zig index ce5a9db..e3af983 100644 --- a/anim/test/recordings.zig +++ b/anim/test/recordings.zig @@ -210,3 +210,21 @@ test "libc's open at its syscall: the blocks never reached folded, no loop made const here = g.nodes[g.here.?]; try expect(here.y >= off and here.y + here.h <= off + room and g.w <= 1792); } + +test "the source follows the pc into musl's own files and back to main's line" { + // musl is built from Zig's sources with the program: its files are always the build's to give. + const rec = canim.open(recordings.musl); + const main = rec.call("main", 0); + try std.testing.expectEqualStrings("hello.c", rec.sources[rec.shown[main.enter].src].name()); + var files: [3]bool = @splat(false); + var back = false; + for (rec.shown[main.enter..], main.enter..) |s, i| { + const name = rec.sources[s.src].name(); + for ([_][]const u8{ "open.c", "__syscall_cp.c", "syscall_arch.h" }, &files) |want, *seen| seen.* = seen.* or (s.here and std.mem.eql(u8, name, want)); + // Where it is on a line of musl's, the panel shows it: never main's held over. + if (s.here) try expect(rec.sourced(i)); + back = back or (files[0] and s.here and std.mem.eql(u8, name, "hello.c") and s.line == 6); + } + for (files) |seen| try expect(seen); + try expect(back); +} |
