GitLab will be upgraded to the 12.10.14-ce.0 on 28 Sept 2020 at 2.00pm (AEDT) to 2.30pm (AEDT). During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to us at N110 (b) CSIT building.

test_convops.py 382 Bytes
Newer Older
John Zhang's avatar
John Zhang committed
1
from util import fncptr_from_c_script
2 3 4


def test_trunc():
John Zhang's avatar
John Zhang committed
5
    fn, _ = fncptr_from_c_script("test_trunc.c", "test_fnc")
6 7 8 9
    assert fn() == 0x58324b55


def test_sext():
John Zhang's avatar
John Zhang committed
10
    fn, _ = fncptr_from_c_script("test_sext.c", "test_fnc")
11 12 13
    assert fn() == 0xffffffffa8324b55

def test_zext():
John Zhang's avatar
John Zhang committed
14
    fn, _ = fncptr_from_c_script("test_zext.c", "test_fnc")
15
    assert fn() == 0x00000000a8324b55