test_cmpops.py 801 Bytes
Newer Older
1
from test_milestones import get_fncptr
2 3

def test_eq_int():
4
    fn = get_fncptr("test_eq_int", "test_fnc")
5 6 7
    assert fn() == 0

def test_eq_ref():
8
    fn = get_fncptr("test_eq_ref", "test_fnc")
9 10 11
    assert fn() == 0

def test_ne_int():
12
    fn = get_fncptr("test_ne_int", "test_fnc")
13 14 15
    assert fn() == 1

def test_ne_ref():
16
    fn = get_fncptr("test_ne_ref", "test_fnc")
17 18 19
    assert fn() == 1

def test_sge():
20
    fn = get_fncptr("test_sge", "test_fnc")
21 22 23
    assert fn() == 1

def test_sgt():
24
    fn = get_fncptr("test_sgt", "test_fnc")
25 26 27
    assert fn() == 0

def test_sle():
28
    fn = get_fncptr("test_sle", "test_fnc")
29 30 31
    assert fn() == 1

def test_slt():
32
    fn = get_fncptr("test_slt", "test_fnc")
33 34 35
    assert fn() == 0

def test_ult():
36
    fn = get_fncptr("test_ult", "test_fnc")
37
    assert fn() == 0