1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fixed tests to work with cmocka 0.4.1

This commit is contained in:
James Booth 2014-05-26 01:05:19 +01:00
parent 60b59d984a
commit 52f66fde10
6 changed files with 17 additions and 17 deletions

View File

@ -10,15 +10,15 @@ install:
- sudo make install
- cd ..
- rm -rf libstrophe
- wget https://open.cryptomilk.org/attachments/download/34/cmocka-0.3.2.tar.xz
- tar -xvf cmocka-0.3.2.tar.xz
- cd cmocka-0.3.2
- wget https://open.cryptomilk.org/attachments/download/42/cmocka-0.4.1.tar.xz
- tar -xvf cmocka-0.4.1.tar.xz
- cd cmocka-0.4.1
- mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
- make
- sudo make install
- cd ../..
- rm -rf cmocka-0.3.2
- rm -rf cmocka-0.4.1
- ./bootstrap.sh
script: ./configure && make && make check

View File

@ -11,13 +11,13 @@ static ProfAccount *
_mock_accounts_get_account(const char * const name)
{
check_expected(name);
return (ProfAccount *)mock();
return mock_ptr_type(ProfAccount *);
}
gchar **
_mock_accounts_get_list(void)
{
return (gchar **)mock();
return mock_ptr_type(gchar **);
}
void

View File

@ -41,7 +41,7 @@ void log_msg(log_level_t level, const char * const area,
const char * const msg) {}
char * get_log_file_location(void)
{
return (char *)mock();
return mock_ptr_type(char *);
}
log_level_t log_level_from_string(char *log_level)
@ -56,7 +56,7 @@ void chat_log_close(void) {}
GSList * chat_log_get_previous(const gchar * const login,
const gchar * const recipient, GSList *history)
{
return (GSList *)mock();
return mock_ptr_type(GSList *);
}
void groupchat_log_init(void) {}

View File

@ -24,20 +24,20 @@ _mock_otr_keygen(ProfAccount *account)
static char *
_mock_otr_libotr_version(void)
{
return (char *)mock();
return mock_ptr_type(char *);
}
static char *
_mock_otr_get_my_fingerprint(void)
{
return (char *)mock();
return mock_ptr_type(char *);
}
static char *
_mock_otr_get_their_fingerprint(const char * const recipient)
{
check_expected(recipient);
return (char *)mock();
return mock_ptr_type(char *);
}
static gboolean
@ -49,7 +49,7 @@ _mock_otr_key_loaded(void)
static char *
_mock_otr_start_query(void)
{
return (char *)mock();
return mock_ptr_type(char *);
}
void

View File

@ -73,7 +73,7 @@ void _mock_cons_show_account_list(gchar **accounts)
static
char * _mock_ui_ask_password(void)
{
return (char *)mock();
return mock_ptr_type(char *);
}
static
@ -91,7 +91,7 @@ win_type_t _mock_ui_current_win_type(void)
static
char * _mock_ui_current_recipeint(void)
{
return (char *)mock();
return mock_ptr_type(char *);
}
static

View File

@ -17,7 +17,7 @@ _mock_jabber_get_connection_status(void)
static char *
_mock_jabber_get_account_name(void)
{
return (char *)mock();
return mock_ptr_type(char *);
}
static void
@ -47,7 +47,7 @@ _mock_jabber_connect_with_account(const ProfAccount * const account)
static char *
_mock_jabber_get_presence_message(void)
{
return (char *)mock();
return mock_ptr_type(char *);
}
static void
@ -61,7 +61,7 @@ _mock_presence_update(resource_presence_t status, const char * const msg, int id
static const GList *
_mock_bookmark_get_list(void)
{
return (GList *)mock();
return mock_ptr_type(GList *);
}
static gboolean