diff options
author | James Booth <boothj5@gmail.com> | 2014-05-26 01:05:19 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-05-26 01:05:19 +0100 |
commit | 52f66fde105eb48f114d6c92ff71da78ec458466 (patch) | |
tree | 12803993d0a38d5815b25778de88604756363389 | |
parent | 60b59d984a4576c780d56e9427248657776fdb01 (diff) | |
download | profani-tty-52f66fde105eb48f114d6c92ff71da78ec458466.tar.gz |
Fixed tests to work with cmocka 0.4.1
-rw-r--r-- | .travis.yml | 8 | ||||
-rw-r--r-- | tests/config/mock_accounts.c | 4 | ||||
-rw-r--r-- | tests/log/mock_log.c | 4 | ||||
-rw-r--r-- | tests/otr/mock_otr.c | 8 | ||||
-rw-r--r-- | tests/ui/mock_ui.c | 4 | ||||
-rw-r--r-- | tests/xmpp/mock_xmpp.c | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml index b24eb879..c8055c26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tests/config/mock_accounts.c b/tests/config/mock_accounts.c index 34f8624f..6c555e0d 100644 --- a/tests/config/mock_accounts.c +++ b/tests/config/mock_accounts.c @@ -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 diff --git a/tests/log/mock_log.c b/tests/log/mock_log.c index 4b9aeb14..d423b5bb 100644 --- a/tests/log/mock_log.c +++ b/tests/log/mock_log.c @@ -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) {} diff --git a/tests/otr/mock_otr.c b/tests/otr/mock_otr.c index e73d0ba2..25409197 100644 --- a/tests/otr/mock_otr.c +++ b/tests/otr/mock_otr.c @@ -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 diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c index e81118e9..2cfde09a 100644 --- a/tests/ui/mock_ui.c +++ b/tests/ui/mock_ui.c @@ -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 diff --git a/tests/xmpp/mock_xmpp.c b/tests/xmpp/mock_xmpp.c index 7faf7170..940356ca 100644 --- a/tests/xmpp/mock_xmpp.c +++ b/tests/xmpp/mock_xmpp.c @@ -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 |