Skip to content

Commit eab55c9

Browse files
committed
Add hash test for type_qualifiers_t
1 parent 29e2a2a commit eab55c9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

unittests/test_hash.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ def test_declarations_hashes(self):
5050
if issubclass(member_type, declarations.declaration_t):
5151
self.assertIsNotNone(hash(member_type()))
5252

53+
def test_type_qualifiers_t_hash(self):
54+
"""
55+
Test if the type_qualifiers_t instance implements a hash method.
56+
57+
The hash is part of the public API, as there are multiple tools
58+
that rely on it to compare type_qualifiers_t instances.
59+
60+
"""
61+
self.assertIsNotNone(hash(declarations.type_qualifiers_t()))
62+
5363

5464
def _create_type_t_mockup(member_type):
5565
nbr_parameters = len(inspect.signature(member_type).parameters)

0 commit comments

Comments
 (0)