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

Method test_ref_save

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

Source from the content-addressed store, hash-verified

112 self.assertEqual(data_before, data_after)
113
114 def test_ref_save(self):
115 expected = 0x10303070
116
117 with DummyStruct.ref(self.mem, self.ptr) as dummy:
118 print(f'B = {dummy.B:#x}')
119 print(f'C = {dummy.C}')
120
121 dummy.A = expected
122
123 data = self.__read_data(DummyStruct.offsetof('A'), 4)
124 self.assertEqual(expected, Wrapper.StructTest.__to_uint(data))
125
126 def test_ref_save_internal(self):
127 expected = 0x16363676

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