コード例 #1
0
ファイル: test_ppc.py プロジェクト: dyceron/randovania
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
ファイル: test_ppc.py プロジェクト: dyceron/randovania
def test_instruction_iter():
    assert _b(ppc.Instruction(1234)) == [0x00, 0x00, 0x04, 0xD2]
コード例 #3
0
ファイル: test_ppc.py プロジェクト: dyceron/randovania
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]