From b981813ec8b66039347d192360f1be65dae1906a Mon Sep 17 00:00:00 2001 From: worthlessnorms <110003169+worthlessnorms@users.noreply.github.com> Date: Fri, 16 Oct 2026 00:05:17 -0500 Subject: [PATCH] Tests: a carried asset's placement holds that asset's bytes --- Engine/Vfs/Test/mod_merge_added_assets_tests.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Engine/Vfs/Test/mod_merge_added_assets_tests.cpp b/Engine/Vfs/Test/mod_merge_added_assets_tests.cpp index 38f08f7..fee51ea 100644 --- a/Engine/Vfs/Test/mod_merge_added_assets_tests.cpp +++ b/Engine/Vfs/Test/mod_merge_added_assets_tests.cpp @@ -492,6 +492,13 @@ void carried_payload_written_once() { expect(first->location == second->location && first->offset == second->offset, "carried once: the two copies read different payloads (byte " + std::to_string(first->offset) + " and byte " + std::to_string(second->offset) + ")"); + if (first) { + const auto archive = read(fixture.catalog.root / mods::generated_folder / "Win32" / "pkg" / vfs::archive_file(first->location.archive)); + const auto song = encoded(ebx_document(guid(10), {guid(11)})); + expect(std::uint64_t{first->offset} + first->size <= archive.size() && + Bytes(archive.begin() + first->offset, archive.begin() + first->offset + first->size) == song, + "carried once: the placement does not hold the song's bytes"); + } } // Every placement in every merged TOC lies inside an archive that exists, and the merged layout