╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │920 │ │921 // each side's edit to a different field survives, without conflicting │ │922 const merged = try readIssue(Repo.DB, repo_opts.hash, haxy_moment, &arena, &second_id); │ │923 - try std.testing.expectEqualStrings("Search results ignore the archived project filter", merged.title); │ │924 - try std.testing.expectEqualStrings("Archived projects are ranked before the flag is applied.", merged.description); │ │925 - try std.testing.expectEqualStrings("bug search", merged.tags); │ │923 + try std.testing.expectEqualStrings("Search results ignore the archived project filter", merged.event.title); │ │924 + try std.testing.expectEqualStrings("Archived projects are ranked before the flag is applied.", merged.event.description); │ │925 + try std.testing.expectEqualStrings("bug search", merged.event.tags); │ │926 │ │927 // each merged field is attributed to the branch it came from │ │928 try std.testing.expectEqualSlices(u8, &retitle_oid, &try readOid(Repo.DB, repo_opts.hash, haxy_moment, &second_id, "title"));│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │940 var third_id: [evt.event_id_size]u8 = undefined; │ │941 _ = try std.fmt.hexToBytes(&third_id, &events_to_consume[2].id); │ │942 const retagged = try readIssue(Repo.DB, repo_opts.hash, haxy_moment, &arena, &third_id);│ │943 - try std.testing.expectEqualStrings("enhancement roadmap", retagged.tags); │ │943 + try std.testing.expectEqualStrings("enhancement roadmap", retagged.event.tags); │ │944 │ │945 try std.testing.expect(null == try tag_to_issues.getCursor("backend open")); │ │946 try std.testing.expect(null == try tag_to_issues.getCursor("preferences open")); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │1013 var kept_id: [evt.event_id_size]u8 = undefined; │ │1014 _ = try std.fmt.hexToBytes(&kept_id, &events_to_consume2[1].id); │ │1015 const kept = try readIssue(Repo.DB, repo_opts.hash, haxy_moment, &arena, &kept_id);│ │1016 - try std.testing.expectEqualStrings("Kept by the edit", kept.title); │ │1016 + try std.testing.expectEqualStrings("Kept by the edit", kept.event.title); │ │1017 } │ │1018 } │ │1019 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1042 haxy_moment: DB.HashMap(.read_only), │ │1043 arena: *std.heap.ArenaAllocator, │ │1044 id: *const [evt.event_id_size]u8, │ │1045 -) !evt.Issue { │ │1045 +) !evt.Issue.Record { │ │1046 const event_id_to_issue_cursor = try haxy_moment.getCursor(hash.hashInt(hash_kind, "event-id->issue")) orelse return error.NotFound;│ │1047 const event_id_to_issue = try DB.HashMap(.read_only).init(event_id_to_issue_cursor); │ │1048 const issue_cursor = try event_id_to_issue.getCursor(hash.hashInt(hash_kind, id)) orelse return error.NotFound; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │1049 const issue_map = try DB.HashMap(.read_only).init(issue_cursor); │ │1050 - return try evt.read(evt.Issue, DB, hash_kind, arena, issue_map); │ │1050 + return try evt.read(evt.Issue.Record, DB, hash_kind, arena, issue_map);│ │1051 } │ │1052 │ │1053 test "user and repo" { │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1146 // get the user out of the map that was edited │ │1147 const user_cursor = try event_id_to_user.getCursor(hash.hashInt(repo_opts.hash, &user_event_id)) orelse return error.NotFound; │ │1148 const user_map = try Repo.DB.HashMap(.read_only).init(user_cursor); │ │1149 - const user_event = try evt.read(evt.User, Repo.DB, repo_opts.hash, &arena, user_map); │ │1149 + const user_event = try evt.read(evt.User.Record, Repo.DB, repo_opts.hash, &arena, user_map); │ │1150 │ │1151 // the password was correctly edited │ │1152 - try std.testing.expectEqualStrings(events_to_consume[1].event.user.?.password_hash, user_event.password_hash); │ │1152 + try std.testing.expectEqualStrings(events_to_consume[1].event.user.?.password_hash, user_event.event.password_hash); │ │1153 │ │1154 // get the map of repos │ │1155 const event_id_to_repo_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "event-id->repo")) orelse return error.NotFound;│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1158 // get the repo out of the map │ │1159 const repo_cursor = try event_id_to_repo.getCursor(hash.hashInt(repo_opts.hash, &repo_event_id)) orelse return error.NotFound; │ │1160 const repo_map = try Repo.DB.HashMap(.read_only).init(repo_cursor); │ │1161 - const repo_event = try evt.read(evt.Repo, Repo.DB, repo_opts.hash, &arena, repo_map); │ │1161 + const repo_event = try evt.read(evt.Repo.Record, Repo.DB, repo_opts.hash, &arena, repo_map); │ │1162 │ │1163 - try std.testing.expectEqualSlices(u8, &user_event_id, repo_event.user_id); │ │1164 - try std.testing.expectEqualStrings("ziglings", repo_event.name); │ │1163 + try std.testing.expectEqualSlices(u8, &user_event_id, repo_event.event.user_id); │ │1164 + try std.testing.expectEqualStrings("ziglings", repo_event.event.name); │ │1165 │ │1166 // get the repos created by the user │ │1167 const user_id_to_repo_id_set_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "user-id->repo-id-set")) orelse return error.NotFound;│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1338 const e2r = try Repo.DB.HashMap(.read_only).init(e2r_cur); │ │1339 const rc = try e2r.getCursor(hash.hashInt(repo_opts.hash, &repo_ids[0])) orelse return error.NotFound;│ │1340 const rm = try Repo.DB.HashMap(.read_only).init(rc); │ │1341 - const re = try evt.read(evt.Repo, Repo.DB, repo_opts.hash, &arena, rm); │ │1342 - try std.testing.expectEqualStrings("updated", re.description); │ │1341 + const re = try evt.read(evt.Repo.Record, Repo.DB, repo_opts.hash, &arena, rm); │ │1342 + try std.testing.expectEqualStrings("updated", re.event.description); │ │1343 } │ │1344 } │ │1345 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯