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)
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))
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))
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)
def test_null_data(): init_size = mock.MagicMock() CHAR_POINTER_test = CHAR_POINTER(int(init_size)) CHAR_POINTER_test.null_data()
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)
def test_size(): init_size = mock.MagicMock() CHAR_POINTER_test = CHAR_POINTER(int(init_size)) CHAR_POINTER_test.size()