Exemplo n.º 1
0
def test_from_u16_with_positive():
    assert from_u16(17) == 17
Exemplo n.º 2
0
def test_from_u16_with_zero():
    assert from_u16(0) == 0
Exemplo n.º 3
0
def test_from_u16_with_another_negative():
    assert from_u16(40493) == -25043
Exemplo n.º 4
0
def test_from_u16_with_mid_sized_negative():
    assert from_u16(63802) == -1734
Exemplo n.º 5
0
def test_from_u16_with_max_negative():
    assert from_u16(32768) == -32768
Exemplo n.º 6
0
def test_from_u16_with_min_negative():
    assert from_u16(65535) == -1
Exemplo n.º 7
0
def test_stdlib_tstrcmp():
    vm = execute_program_helper(helper_stdlib("tstrcmp", "a", "b"))

    assert from_u16(vm.registers[1]) < 0