Persist item custody and restore in-flight work from historical saves
This commit is contained in:
1 parent
4f42488d54
commit
f1b8d41bb4
10 files changed
+1226
-16
No files matched your search
@@ -180,8 +180,8 @@ Test CheckpointTests::test_authentic_v1_import_and_authenticated_schema_body_pai
|
||||
}
|
||||
auto imported = decoded(old_checkpoint(0), catalog);
|
||||
auto current = encoded(*imported.world, rules);
|
||||
require(static_cast<unsigned char>(current[8]) == 2 &&
|
||||
static_cast<unsigned char>(current[layout(current).body_begin + 8]) == 14,
|
||||
require(static_cast<unsigned char>(current[8]) == 3 &&
|
||||
static_cast<unsigned char>(current[layout(current).body_begin + 8]) == 15,
|
||||
"new checkpoint lacks the current schema/body pair");
|
||||
auto false_legacy = current;
|
||||
change(false_legacy, 8, std::uint32_t{1}); rehash(false_legacy);
|
||||
@@ -211,7 +211,7 @@ Test CheckpointTests::test_round_trip_preserves_identity_and_legacy_world_bytes(
|
||||
require(saved_state(*restored.world) == before && saved_state(world) == before,
|
||||
"checkpoint changed the original or restored canonical state");
|
||||
std::ostringstream modern(std::ios::binary);
|
||||
world.write_save(modern, WorldSaveFormat::Current14);
|
||||
world.write_save(modern, WorldSaveFormat::Current15);
|
||||
require(bytes.substr(layout(bytes).body_begin, modern.str().size()) == modern.str(),
|
||||
"checkpoint did not use the current world serialization");
|
||||
require(before.substr(0, 8) == "SETTLERS" && static_cast<unsigned char>(before[8]) == 13,
|
||||
|
||||
Reference in new issue
Block a user