コード例 #1
0
ファイル: test_core.py プロジェクト: gapry/L4OS
    def test_copy(self):
        seg = DataElfSegment()
        new_seg = seg.copy()

        seg = SectionedElfSegment()
        seg.sections = [UnpreparedElfSection("test")]
        new_seg = seg.copy()

        seg = DataElfSegment()
        seg._data = ByteArray()
        new_seg = seg.copy()

        seg = DataElfSegment()
        seg.prepare(34)
        new_seg = seg.copy()

        seg = HeaderElfSegment()
        new_Seg = seg.copy()
コード例 #2
0
ファイル: test_core.py プロジェクト: saif1413/L4OS
    def test_copy(self):
        seg = DataElfSegment()
        new_seg = seg.copy()

        seg = SectionedElfSegment()
        seg.sections = [UnpreparedElfSection("test")]
        new_seg = seg.copy()

        seg = DataElfSegment()
        seg._data = ByteArray()
        new_seg = seg.copy()

        seg = DataElfSegment()
        seg.prepare(34)
        new_seg = seg.copy()

        seg = HeaderElfSegment()
        new_Seg = seg.copy()
コード例 #3
0
    def test_copy_into(self):
        elf_from = UnpreparedElfFile()
        elf_to = UnpreparedElfFile()
        seg = DataElfSegment(elf_from, ByteArray("pants"))
        new_seg = seg.copy_into(elf_to)

        seg = SectionedElfSegment(elf_from)
        seg.sections = [UnpreparedElfSection(elf_from, "test")]
        new_seg = seg.copy_into(elf_to)

        seg = DataElfSegment(elf_from, ByteArray("pants"))
        seg._data = ByteArray()
        new_seg = seg.copy_into(elf_to)

        seg = DataElfSegment(elf_from, ByteArray("pants"))
        seg.prepare(34)
        new_seg = seg.copy_into(elf_to)

        seg = HeaderElfSegment(elf_from)
        new_seg = seg.copy_into(elf_to)