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

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