def test_parse_parameter_c_types(self): ct_descriptor = get_descriptor( '../tests/fixtures/one_func_call_table.xml') actuall = init_db.read_functions(ct_descriptor) assert_equal(actuall[0]['parameter_c_types'], ['*char', 'int'])
def test_create_signature(self): ct_descriptor = get_descriptor( '../tests/fixtures/one_func_call_table.xml') actuall = init_db.read_functions(ct_descriptor) assert_equal(actuall[0]['signature'], 'access-fname-int_amode')
def test_parse_parameter(self): ct_descriptor = get_descriptor( '../tests/fixtures/one_func_call_table.xml') actuall = init_db.read_functions(ct_descriptor) assert_equal(actuall[0]['parameter'], ['fname', 'int_amode'])
def test_parse_return(self): ct_descriptor = get_descriptor( '../tests/fixtures/one_func_call_table.xml') actuall = init_db.read_functions(ct_descriptor) assert_equal(actuall[0]['return'], 'int')
def test_parse_header(self): ct_descriptor = get_descriptor( '../tests/fixtures/one_func_call_table.xml') actuall = init_db.read_functions(ct_descriptor) assert_equal(actuall[0]['header'], 'unistd.h')
def test_parse_name(self): ct_descriptor = get_descriptor( '../tests/fixtures/one_func_call_table.xml') actuall = init_db.read_functions(ct_descriptor) assert_equal(actuall[0]['name'], 'access')
def test_empty_calltable_produces_empty_list(self): actuall = init_db.read_functions( get_path('../tests/fixtures/empty_call_table.xml')) assert_equal(actuall, [])