Ejemplo n.º 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"
Ejemplo n.º 2
0
def test_instruction_iter():
    assert _b(ppc.Instruction(1234)) == [0x00, 0x00, 0x04, 0xD2]
Ejemplo n.º 3
0
def test_instruction_eq():
    assert ppc.Instruction(1234) == ppc.Instruction(1234)
Ejemplo n.º 4
0
def test_instruction_iter():
    assert list(ppc.Instruction(1234).bytes_for(0)) == [0x00, 0x00, 0x04, 0xD2]