示例#1
0
def test_instruction_with_label():
    instruction = ppc.Instruction(1234)
    assert instruction.label is None

    with_label = instruction.with_label("foobar")
    assert instruction is with_label
    assert instruction.label == "foobar"
示例#2
0
def test_instruction_iter():
    assert _b(ppc.Instruction(1234)) == [0x00, 0x00, 0x04, 0xD2]
示例#3
0
def test_instruction_eq():
    assert ppc.Instruction(1234) == ppc.Instruction(1234)
示例#4
0
def test_instruction_iter():
    assert list(ppc.Instruction(1234).bytes_for(0)) == [0x00, 0x00, 0x04, 0xD2]