Esempio n. 1
0
def test_onscreentext_node_roll():
    text = OnscreenText()

    text.set_r(45)
    assert text['roll'] == 0
    assert text.roll == 0
    assert text.getRoll() == 0
    assert text.text_r == 0
    assert text.getTextR() == 0
    assert text.get_r() == 45
Esempio n. 2
0
def test_onscreentext_text_roll():
    text = OnscreenText(roll=1)
    assert text['roll'] == 1
    assert text.roll == 1
    assert text.getRoll() == 1
    assert text.text_r == -1
    assert text.getTextR() == -1
    assert text.get_r() == 0

    text.setTextR(2)
    assert text['roll'] == -2
    assert text.roll == -2
    assert text.getRoll() == -2
    assert text.text_r == 2
    assert text.getTextR() == 2
    assert text.get_r() == 0

    text.text_r = 3
    assert text['roll'] == -3
    assert text.roll == -3
    assert text.getRoll() == -3
    assert text.text_r == 3
    assert text.getTextR() == 3
    assert text.get_r() == 0

    text.setRoll(4)
    assert text['roll'] == 4
    assert text.roll == 4
    assert text.getRoll() == 4
    assert text.text_r == -4
    assert text.getTextR() == -4
    assert text.get_r() == 0

    text['roll'] = 5
    assert text['roll'] == 5
    assert text.roll == 5
    assert text.getRoll() == 5
    assert text.text_r == -5
    assert text.getTextR() == -5
    assert text.get_r() == 0