Skip to content

Commit 3428acc

Browse files
committed
Add a test for gdef.HRESULT_FACILITY()
1 parent ee37178 commit 3428acc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_generated_def.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ def test_CTL_CODE_macro():
113113
assert gdef.IOCTL_MOUNTMGR_CREATE_POINT == 0x006DC000
114114
assert gdef.IOCTL_MOUNTMGR_QUERY_POINTS == 0x006D0008
115115

116+
def test_HRESULT_FACILITY_macro():
117+
"""Test that the HRESULT_FACILITY() macro, (reimplemented in python in windef.py) returns the correct values"""
118+
assert gdef.HRESULT_FACILITY(0x800706d1) == gdef.FACILITY_WIN32 == 7
119+
# RPC_E_INVALID_HEADER(0x80010111)
120+
assert gdef.HRESULT_FACILITY(gdef.RPC_E_INVALID_HEADER) == gdef.FACILITY_RPC == 1
121+
116122

117123
# typedef struct _DnsRecordFlags
118124
# {

0 commit comments

Comments
 (0)