MCPcopy Index your code
hub / github.com/qilingframework/qiling / test_volatile_ref_internal

Method test_volatile_ref_internal

tests/test_struct.py:150–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

148 self.assertEqual(expected, dummy.D)
149
150 def test_volatile_ref_internal(self):
151 dummy = DummyStruct.volatile_ref(self.mem, self.ptr)
152
153 expected = 0x51535357
154 dummy.C.X = expected
155 data = self.__read_data(DummyStruct.offsetof('C') + DummyInternalStruct.offsetof('X'), 4)
156 self.assertEqual(expected, Wrapper.StructTest.__to_uint(data))
157
158 # BUG: ctype.c_wchar size differs between python for windows and linux.on windows it has the
159 # size of 2 as expected (same as the 'utf-16le' encoding), where on linux the size is 4 (same

Callers

nothing calls this directly

Calls 4

__read_dataMethod · 0.95
volatile_refMethod · 0.80
offsetofMethod · 0.80
__to_uintMethod · 0.80

Tested by

no test coverage detected