╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │498 │ │499 try std.testing.expectEqualStrings(events_to_consume2[0].event.issue.?.description, first_issue.description); │ │500 try std.testing.expectEqualStrings(events_to_consume2[0].event.issue.?.tags, first_issue.tags); │ │501 + } │ │502 + │ │503 + // the ordered issue set unions both branches' additions │ │504 + { │ │505 + const issue_id_set_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "issue-id-set")) orelse return error.NotFound;│ │506 + const issue_id_set = try Repo.DB.SortedSet(.read_only).init(issue_id_set_cursor); │ │507 + try std.testing.expectEqual(6, try issue_id_set.count()); │ │508 + │ │509 + var found = [_]bool{false} ** 6; │ │510 + var iter = try issue_id_set.iteratorFromIndex(0); │ │511 + while (try iter.next()) |id_cursor_val| { │ │512 + var id_cursor = id_cursor_val; │ │513 + const id_kv = try id_cursor.readKeyValuePair(); │ │514 + var order_key: [@sizeOf(u64) + evt.event_id_size]u8 = undefined; │ │515 + _ = try id_kv.key_cursor.readBytes(&order_key); │ │516 + const id_hex = std.fmt.bytesToHex(order_key[@sizeOf(u64)..].*, .lower); │ │517 + for (events_to_consume, 0..) |event, i| { │ │518 + if (std.mem.eql(u8, &id_hex, &event.id)) found[i] = true; │ │519 + } │ │520 + for (events_to_consume2, 0..) |event, i| { │ │521 + if (std.mem.eql(u8, &id_hex, &event.id)) found[events_to_consume.len + i] = true; │ │522 + } │ │523 + } │ │524 + for (found) |f| try std.testing.expect(f); │ │525 } │ │526 } │ │527 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯