debug mode for pack/unpack and pair/unpair

This commit is contained in:
BlackMATov
2025-08-26 05:42:04 +07:00
parent 71a7d382c1
commit 12beee6eec
4 changed files with 98 additions and 55 deletions

View File

@@ -19,15 +19,3 @@ for _ = 1, 1000 do
assert(initial_secondary == unpacked_secondary)
assert(0 == unpacked_options)
end
for _ = 1, 1000 do
local initial_primary = math.random(1, 2 ^ 31 - 1)
local initial_secondary = math.random(1, 2 ^ 31 - 1)
local packed_id = evo.pack(initial_primary, initial_secondary)
local unpacked_primary, unpacked_secondary, unpacked_options = evo.unpack(packed_id)
assert(initial_primary % 2 ^ 20 == unpacked_primary)
assert(initial_secondary % 2 ^ 20 == unpacked_secondary)
assert(0 == unpacked_options)
end