ludic.base: core_undrained fills a list the caller keeps; hd_refuse's panic declared; ludic.photo's slug declared (a photograph taken)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 17:06:50 +03:00
parent a0c6f8ce7f
commit 8fbfeb7f9d
6 changed files with 13 additions and 11 deletions

View file

@ -86,11 +86,11 @@ program QueueTest {
q_push(b, 2)
q_drain(b)
let tags = [q_tag(a), q_tag(b)]
let names = core_undrained(tags)
expect_eq(len(names), 1)
let names = new []string
expect_eq(core_undrained(tags, names), 1)
expect(names[0] == "left_behind")
q_drain(a)
expect_eq(len(core_undrained(tags)), 0)
expect_eq(core_undrained(tags, names), 0)
}
# an empty drain allocates nothing and hands back the same empty list; a drained list is the

View file

@ -35,7 +35,7 @@ program RouteTest {
expect(not fishing_cast(toy_fishing_st, 500.0, 2.0))
core_tick_all(base_st, tick_new(1.0 / 60.0, 0, 0.0))
expect_eq(pack_total(toy_pack_st), 3)
expect_eq(len(core_undrained([q_tag(toy_fishing_st.caught)])), 0)
expect_eq(core_undrained([q_tag(toy_fishing_st.caught)], new []string), 0)
}
test "the pack saves its own section and the fishing, which saves nothing, is reset" (base_st: mut BaseState, toy_fishing_st: mut ToyFishingState, toy_pack_st: ToyPackState) {