From 6b797baf0e6b3bc4d74e24af8c399dcae92fb619 Mon Sep 17 00:00:00 2001 From: Nicolas Kruse Date: Wed, 2 Apr 2025 21:20:36 +0200 Subject: [PATCH] test checking for empty results --- tests/test_example_elfs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_example_elfs.py b/tests/test_example_elfs.py index c7f8c29..9d9527a 100644 --- a/tests/test_example_elfs.py +++ b/tests/test_example_elfs.py @@ -19,12 +19,15 @@ def test_simple_c() -> None: print(elf.code_relocations) print('\n') + assert elf.sections for section in elf.sections: assert known_name(section.description), f"Section type {section.type} for {elf.architecture} in {path} is unknown." + assert elf.symbols for sym in elf.symbols: assert known_name(sym.info), f"Symbol info {sym.info} for {elf.architecture} in {path} is unknown." + assert elf.get_relocations() for reloc in elf.get_relocations(): assert known_name(reloc.type), f"Relocation type {reloc.type} for {elf.architecture} in {path} is unknown."