示例#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