Beispiel #1
0
    def test_from_ctype(self):
        ae = self.assertEqual

        data_le = b"\xBD\x42\x57\xAE"
        hresult = hresult_le.from_buffer_copy(data_le)
        hresult = HRESULT.from_ctype(hresult)

        ae(hresult.s, 1)
        ae(hresult.r, 0)
        ae(hresult.c, 1)
        ae(hresult.n, 0)
        ae(hresult.x, 1)
        ae(hresult.facility, 0x0657)
        ae(hresult.code, 0x42BD)
Beispiel #2
0
    def test_from_ctype(self):
        ae = self.assertEqual

        data_le = b"\xBD\x42\x57\xAE"
        hresult = hresult_le.from_buffer_copy(data_le)
        hresult = HRESULT.from_ctype(hresult)

        ae(hresult.s, 1)
        ae(hresult.r, 0)
        ae(hresult.c, 1)
        ae(hresult.n, 0)
        ae(hresult.x, 1)
        ae(hresult.facility, 0x0657)
        ae(hresult.code, 0x42BD)