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

Method test_save_to

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

Source from the content-addressed store, hash-verified

83 self.assertEqual(self.expected['D'], dummy.D)
84
85 def test_save_to(self):
86 dummy = DummyStruct(
87 A=0x0c0a0f0e,
88 B=0x1828384858687888,
89 C=DummyInternalStruct(0x19293949),
90 D=b'Goodbye World!'
91 )
92
93 dummy.save_to(self.mem, self.ptr)
94
95 obj_data = bytes(dummy)
96 mem_data = self.__read_data()
97
98 self.assertEqual(obj_data, mem_data)
99
100 def test_ref_discard(self):
101 data_before = self.__read_data()

Callers

nothing calls this directly

Calls 4

__read_dataMethod · 0.95
DummyStructClass · 0.85
DummyInternalStructClass · 0.85
save_toMethod · 0.80

Tested by

no test coverage detected