示例#1
0
def test_compare_data():
    init_size = mock.MagicMock()
    CHAR_POINTER_test = CHAR_POINTER(int(init_size))
    compare_data_chars = mock.MagicMock(return_value="")
    compare_data_error = mock.MagicMock()
    CHAR_POINTER_test.compare_data(compare_data_chars.return_value,
                                   compare_data_error)
示例#2
0
def test_get_standard_hex_string():
    init_size = mock.MagicMock()
    CHAR_POINTER_test = CHAR_POINTER(int(init_size))
    get_standard_hex_string_offset = mock.MagicMock(return_value=0)
    get_standard_hex_string_size = mock.MagicMock()
    CHAR_POINTER_test.get_standard_hex_string(
        get_standard_hex_string_offset.return_value,
        int(get_standard_hex_string_size))
示例#3
0
def test_assign_partial_data():
    init_size = mock.MagicMock()
    CHAR_POINTER_test = CHAR_POINTER(int(init_size))
    assign_partial_data_chars = mock.MagicMock(return_value=b"1234")
    assign_partial_data_source_offset = mock.MagicMock()
    assign_partial_data_dest_offset = mock.MagicMock(return_value=0)
    assign_partial_data_size = mock.MagicMock()
    CHAR_POINTER_test.assign_partial_data(
        assign_partial_data_chars.return_value,
        int(assign_partial_data_source_offset),
        assign_partial_data_dest_offset.return_value,
        int(assign_partial_data_size))
示例#4
0
def test_get_dword():
    init_size = mock.MagicMock(return_value=4)
    CHAR_POINTER_test = CHAR_POINTER(init_size.return_value)
    get_dword_offset = mock.MagicMock(return_value=0)
    CHAR_POINTER_test.get_dword(get_dword_offset.return_value)
示例#5
0
def test_null_data():
    init_size = mock.MagicMock()
    CHAR_POINTER_test = CHAR_POINTER(int(init_size))
    CHAR_POINTER_test.null_data()
示例#6
0
def test_assign_data():
    init_size = mock.MagicMock(return_value=8)
    CHAR_POINTER_test = CHAR_POINTER(init_size.return_value)
    assign_data_chars = mock.MagicMock(return_value=b"01234567")
    CHAR_POINTER_test.assign_data(assign_data_chars.return_value)
示例#7
0
def test_size():
    init_size = mock.MagicMock()
    CHAR_POINTER_test = CHAR_POINTER(int(init_size))
    CHAR_POINTER_test.size()