fix(unittests): use -1ULL to mean UNSIGNED MATH.MAX

This commit is contained in:
bfredl
2025-07-25 19:49:46 +02:00
committed by Christian Clason
parent 5de2ec76a3
commit af5ac7c7ea
2 changed files with 3 additions and 3 deletions

View File

@@ -590,7 +590,7 @@ describe('marktree', function()
lib.marktree_check(tree)
local iter = ffi.new('MarkTreeIter[1]')
local filter = ffi.new('uint32_t[4]')
filter[0] = -1
filter[0] = -1ULL
ok(lib.marktree_itr_get_filter(tree, 0, 0, 101, 0, filter, iter))
local seen = {}
repeat

View File

@@ -278,7 +278,7 @@ describe('fs.c', function()
itp('does not change owner and group if respective IDs are equal to -1', function()
local uid = uv.fs_stat(filename).uid
local gid = uv.fs_stat(filename).gid
eq(0, os_fchown(filename, -1, -1))
eq(0, os_fchown(filename, -1ULL, -1ULL))
eq(uid, uv.fs_stat(filename).uid)
return eq(gid, uv.fs_stat(filename).gid)
end)
@@ -304,7 +304,7 @@ describe('fs.c', function()
-- User can be a member of only one group.
-- In that case we can not perform this test.
if new_gid then
eq(0, (os_fchown(filename, -1, new_gid)))
eq(0, (os_fchown(filename, -1ULL, new_gid)))
eq(new_gid, uv.fs_stat(filename).gid)
end
end