summaryrefslogtreecommitdiff
path: root/anim/test
diff options
context:
space:
mode:
Diffstat (limited to 'anim/test')
-rw-r--r--anim/test/gallery/atoms.pngbin104822 -> 104943 bytes
-rw-r--r--anim/test/gallery/graph-map.pngbin158401 -> 158281 bytes
-rw-r--r--anim/test/gallery/graph.pngbin76868 -> 76747 bytes
-rw-r--r--anim/test/gallery/loupe.pngbin237479 -> 237134 bytes
-rw-r--r--anim/test/gallery/none.pngbin226735 -> 227070 bytes
-rw-r--r--anim/test/gallery/rest.pngbin233721 -> 232355 bytes
-rw-r--r--anim/test/gallery/rows.pngbin140530 -> 140426 bytes
-rw-r--r--anim/test/gallery/step.pngbin232385 -> 231441 bytes
-rw-r--r--anim/test/gallery/subject.pngbin210007 -> 210027 bytes
-rw-r--r--anim/test/musl.script9
-rw-r--r--anim/test/recordings.zig18
11 files changed, 27 insertions, 0 deletions
diff --git a/anim/test/gallery/atoms.png b/anim/test/gallery/atoms.png
index 8da5c01..acd54a8 100644
--- a/anim/test/gallery/atoms.png
+++ b/anim/test/gallery/atoms.png
Binary files differ
diff --git a/anim/test/gallery/graph-map.png b/anim/test/gallery/graph-map.png
index b16caf6..951d4af 100644
--- a/anim/test/gallery/graph-map.png
+++ b/anim/test/gallery/graph-map.png
Binary files differ
diff --git a/anim/test/gallery/graph.png b/anim/test/gallery/graph.png
index ea9695e..d43db42 100644
--- a/anim/test/gallery/graph.png
+++ b/anim/test/gallery/graph.png
Binary files differ
diff --git a/anim/test/gallery/loupe.png b/anim/test/gallery/loupe.png
index 7f07d94..52bc89a 100644
--- a/anim/test/gallery/loupe.png
+++ b/anim/test/gallery/loupe.png
Binary files differ
diff --git a/anim/test/gallery/none.png b/anim/test/gallery/none.png
index bac000d..4e4d5b1 100644
--- a/anim/test/gallery/none.png
+++ b/anim/test/gallery/none.png
Binary files differ
diff --git a/anim/test/gallery/rest.png b/anim/test/gallery/rest.png
index c368a30..205fc0d 100644
--- a/anim/test/gallery/rest.png
+++ b/anim/test/gallery/rest.png
Binary files differ
diff --git a/anim/test/gallery/rows.png b/anim/test/gallery/rows.png
index dd85690..4d936ab 100644
--- a/anim/test/gallery/rows.png
+++ b/anim/test/gallery/rows.png
Binary files differ
diff --git a/anim/test/gallery/step.png b/anim/test/gallery/step.png
index 19ffc00..5ccb082 100644
--- a/anim/test/gallery/step.png
+++ b/anim/test/gallery/step.png
Binary files differ
diff --git a/anim/test/gallery/subject.png b/anim/test/gallery/subject.png
index 182f8ba..9e36a1d 100644
--- a/anim/test/gallery/subject.png
+++ b/anim/test/gallery/subject.png
Binary files differ
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);
+}