Exemple #1
0
def test_read_write_string_length():
    img = Image(Section(data=bytearray(32), start_address=0x1000))
    img.write_string(0x1000, 'hello world!!!')
    assert img.read_string(0x1000, length=5) == "hello"
Exemple #2
0
def test_read_write_string():
    img = Image(Section(data=bytearray(32), start_address=0x1000))
    img.write_string(0x1000, 'hello')
    assert img.read_string(0x1000) == "hello"