diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-11-11 12:53:20 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-11-11 12:53:20 +0530 |
| commit | 40cec3dade98e91ca89d9f1eae81d53a6b8ddadc (patch) | |
| tree | 87e186a77c4492bcd67bf564085dd50499e8d171 /elf/tests/test_elf.lua | |
| parent | d6236a691a8f213cf82d96c2b6873f6093a22f15 (diff) | |
Suppress lsp diagnostics for these negative testcases.
Diffstat (limited to 'elf/tests/test_elf.lua')
| -rw-r--r-- | elf/tests/test_elf.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/elf/tests/test_elf.lua b/elf/tests/test_elf.lua index 5a4d134..42083d7 100644 --- a/elf/tests/test_elf.lua +++ b/elf/tests/test_elf.lua @@ -287,6 +287,7 @@ test("segment.normalize defaults", function () end) test("segment.normalize does not validate missing type", function () + ---@diagnostic disable-next-line: param-type-mismatch, missing-fields local ok, segment = pcall(elf_segment.normalize, {}) assert(ok, "missing type rejected") assert(segment.type == nil, "type mismatch") @@ -388,6 +389,7 @@ test("segment.pack 32_be", function () "11121314", -- flags "71727374", -- align })) + ---@diagnostic disable-next-line: param-type-mismatch local ns = elf_segment.normalize(s) local actual = elf_segment.pack(ns, ec.Endian.big, ec.Class.bit32) assert(#actual == 32, "invalid ELF32 segment header size") @@ -417,6 +419,7 @@ test("segment.pack 64_le", function () "6867666564636261", -- memsz "7877767574737271", -- align })) + ---@diagnostic disable-next-line: param-type-mismatch local ns = elf_segment.normalize(s) local actual = elf_segment.pack(ns, ec.Endian.little, ec.Class.bit64) assert(#actual == 56, "invalid ELF64 segment header size") @@ -446,6 +449,7 @@ test("segment.pack 64_be", function () "6162636465666768", -- memsz "7172737475767778", -- align })) + ---@diagnostic disable-next-line: param-type-mismatch local ns = elf_segment.normalize(s) local actual = elf_segment.pack(ns, ec.Endian.big, ec.Class.bit64) assert(#actual == 56, "invalid ELF64 segment header size") @@ -473,6 +477,7 @@ test("section.normalize defaults", function () end) test("section.normalize does not validate missing fields", function () + ---@diagnostic disable-next-line: param-type-mismatch, missing-fields local ok, section = pcall(elf_section.normalize, {}) assert(ok, "missing fields rejected") assert(section.name == nil, "name mismatch") |
