mirror of
https://github.com/neovim/neovim.git
synced 2026-04-27 01:34:16 +00:00
fix(unittests): use -1ULL to mean UNSIGNED MATH.MAX
This commit is contained in:
@@ -590,7 +590,7 @@ describe('marktree', function()
|
|||||||
lib.marktree_check(tree)
|
lib.marktree_check(tree)
|
||||||
local iter = ffi.new('MarkTreeIter[1]')
|
local iter = ffi.new('MarkTreeIter[1]')
|
||||||
local filter = ffi.new('uint32_t[4]')
|
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))
|
ok(lib.marktree_itr_get_filter(tree, 0, 0, 101, 0, filter, iter))
|
||||||
local seen = {}
|
local seen = {}
|
||||||
repeat
|
repeat
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ describe('fs.c', function()
|
|||||||
itp('does not change owner and group if respective IDs are equal to -1', function()
|
itp('does not change owner and group if respective IDs are equal to -1', function()
|
||||||
local uid = uv.fs_stat(filename).uid
|
local uid = uv.fs_stat(filename).uid
|
||||||
local gid = uv.fs_stat(filename).gid
|
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)
|
eq(uid, uv.fs_stat(filename).uid)
|
||||||
return eq(gid, uv.fs_stat(filename).gid)
|
return eq(gid, uv.fs_stat(filename).gid)
|
||||||
end)
|
end)
|
||||||
@@ -304,7 +304,7 @@ describe('fs.c', function()
|
|||||||
-- User can be a member of only one group.
|
-- User can be a member of only one group.
|
||||||
-- In that case we can not perform this test.
|
-- In that case we can not perform this test.
|
||||||
if new_gid then
|
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)
|
eq(new_gid, uv.fs_stat(filename).gid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user