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

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