diff --git a/test/test_Exceptions.py b/test/test_Exceptions.py
index <HASH>..<HASH> 100644
--- a/test/test_Exceptions.py
+++ b/test/test_Exceptions.py
@@ -57,6 +57,14 @@ class TestUtil(unittest.TestCase):
         text = str(exc)
         self.assertEqual(text, "")
 
+    def test_hresult(self):
+        hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER)
+        self.assertEqual(hresult, SCARD_S_SUCCESS)
+
+        hresult, hcard, dwActiveProtocol = SCardConnect(
+            hcontext, "INVALID READER NAME", SCARD_SHARE_SHARED, SCARD_PROTOCOL_ANY
+        )
+        self.assertEqual(hresult, SCARD_E_UNKNOWN_READER)
 
 if __name__ == '__main__':
     unittest.main()
test_SCardGetErrorMessage: check the value of SCARD_E_UNKNOWN_READER

macOS and Linux does not define the return type of PC/SC function the
same way. So we check the returned value correspond to what PySCard has
defined.