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:
parent
60b59d984a
commit
52f66fde10
@ -10,15 +10,15 @@ install:
|
|||||||
- sudo make install
|
- sudo make install
|
||||||
- cd ..
|
- cd ..
|
||||||
- rm -rf libstrophe
|
- rm -rf libstrophe
|
||||||
- wget https://open.cryptomilk.org/attachments/download/34/cmocka-0.3.2.tar.xz
|
- wget https://open.cryptomilk.org/attachments/download/42/cmocka-0.4.1.tar.xz
|
||||||
- tar -xvf cmocka-0.3.2.tar.xz
|
- tar -xvf cmocka-0.4.1.tar.xz
|
||||||
- cd cmocka-0.3.2
|
- cd cmocka-0.4.1
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
|
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
- make
|
- make
|
||||||
- sudo make install
|
- sudo make install
|
||||||
- cd ../..
|
- cd ../..
|
||||||
- rm -rf cmocka-0.3.2
|
- rm -rf cmocka-0.4.1
|
||||||
- ./bootstrap.sh
|
- ./bootstrap.sh
|
||||||
script: ./configure && make && make check
|
script: ./configure && make && make check
|
||||||
|
@ -11,13 +11,13 @@ static ProfAccount *
|
|||||||
_mock_accounts_get_account(const char * const name)
|
_mock_accounts_get_account(const char * const name)
|
||||||
{
|
{
|
||||||
check_expected(name);
|
check_expected(name);
|
||||||
return (ProfAccount *)mock();
|
return mock_ptr_type(ProfAccount *);
|
||||||
}
|
}
|
||||||
|
|
||||||
gchar **
|
gchar **
|
||||||
_mock_accounts_get_list(void)
|
_mock_accounts_get_list(void)
|
||||||
{
|
{
|
||||||
return (gchar **)mock();
|
return mock_ptr_type(gchar **);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -41,7 +41,7 @@ void log_msg(log_level_t level, const char * const area,
|
|||||||
const char * const msg) {}
|
const char * const msg) {}
|
||||||
char * get_log_file_location(void)
|
char * get_log_file_location(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
log_level_t log_level_from_string(char *log_level)
|
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,
|
GSList * chat_log_get_previous(const gchar * const login,
|
||||||
const gchar * const recipient, GSList *history)
|
const gchar * const recipient, GSList *history)
|
||||||
{
|
{
|
||||||
return (GSList *)mock();
|
return mock_ptr_type(GSList *);
|
||||||
}
|
}
|
||||||
|
|
||||||
void groupchat_log_init(void) {}
|
void groupchat_log_init(void) {}
|
||||||
|
@ -24,20 +24,20 @@ _mock_otr_keygen(ProfAccount *account)
|
|||||||
static char *
|
static char *
|
||||||
_mock_otr_libotr_version(void)
|
_mock_otr_libotr_version(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_mock_otr_get_my_fingerprint(void)
|
_mock_otr_get_my_fingerprint(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
_mock_otr_get_their_fingerprint(const char * const recipient)
|
_mock_otr_get_their_fingerprint(const char * const recipient)
|
||||||
{
|
{
|
||||||
check_expected(recipient);
|
check_expected(recipient);
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -49,7 +49,7 @@ _mock_otr_key_loaded(void)
|
|||||||
static char *
|
static char *
|
||||||
_mock_otr_start_query(void)
|
_mock_otr_start_query(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -73,7 +73,7 @@ void _mock_cons_show_account_list(gchar **accounts)
|
|||||||
static
|
static
|
||||||
char * _mock_ui_ask_password(void)
|
char * _mock_ui_ask_password(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
@ -91,7 +91,7 @@ win_type_t _mock_ui_current_win_type(void)
|
|||||||
static
|
static
|
||||||
char * _mock_ui_current_recipeint(void)
|
char * _mock_ui_current_recipeint(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -17,7 +17,7 @@ _mock_jabber_get_connection_status(void)
|
|||||||
static char *
|
static char *
|
||||||
_mock_jabber_get_account_name(void)
|
_mock_jabber_get_account_name(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -47,7 +47,7 @@ _mock_jabber_connect_with_account(const ProfAccount * const account)
|
|||||||
static char *
|
static char *
|
||||||
_mock_jabber_get_presence_message(void)
|
_mock_jabber_get_presence_message(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -61,7 +61,7 @@ _mock_presence_update(resource_presence_t status, const char * const msg, int id
|
|||||||
static const GList *
|
static const GList *
|
||||||
_mock_bookmark_get_list(void)
|
_mock_bookmark_get_list(void)
|
||||||
{
|
{
|
||||||
return (GList *)mock();
|
return mock_ptr_type(GList *);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user