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

Method test_ref_save_internal

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

Source from the content-addressed store, hash-verified

124 self.assertEqual(expected, Wrapper.StructTest.__to_uint(data))
125
126 def test_ref_save_internal(self):
127 expected = 0x16363676
128
129 with DummyStruct.ref(self.mem, self.ptr) as dummy:
130 dummy.C.X = expected
131
132 data = self.__read_data(DummyStruct.offsetof('C') + DummyInternalStruct.offsetof('X'), 4)
133 self.assertEqual(expected, Wrapper.StructTest.__to_uint(data))
134
135 def test_volatile_ref(self):
136 dummy = DummyStruct.volatile_ref(self.mem, self.ptr)

Callers

nothing calls this directly

Calls 4

__read_dataMethod · 0.95
refMethod · 0.80
offsetofMethod · 0.80
__to_uintMethod · 0.80

Tested by

no test coverage detected