Exemplo n.º 1
0
def test_core_predecrement_a():
    warrior = Warrior(processes=[0])
    core = Core(data=[DAT('F', '{', 1, '$', 1), DAT('F', '$', 0, '$', 0)])
    game = Round(core=core, warriors=[warrior], init_warriors=False)
    game.simulation_step()
    assert game.core()[1].a_value() == -1
Exemplo n.º 2
0
def test_instruction_to_str():
    instruction = DAT('AB', '#', 1, '@', -1)
    assert str(instruction) == 'DAT.AB #1, @-1'