about summary refs log tree commit diff stats
path: root/tests/otr
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-12-25 00:57:02 +0000
committerJames Booth <boothj5@gmail.com>2014-12-25 00:57:02 +0000
commit25a60c999745b1b5f9fb9372e7d22237e3a0aa0b (patch)
tree80c33a7a5cf1c945d9137b7928c88814042a8036 /tests/otr
parent7a104431645af3a37b3626748a0290dda3d0cee4 (diff)
downloadprofani-tty-25a60c999745b1b5f9fb9372e7d22237e3a0aa0b.tar.gz
Removed old mocks
Diffstat (limited to 'tests/otr')
-rw-r--r--tests/otr/mock_otr.c97
-rw-r--r--tests/otr/mock_otr.h16
2 files changed, 0 insertions, 113 deletions
diff --git a/tests/otr/mock_otr.c b/tests/otr/mock_otr.c
deleted file mode 100644
index 25409197..00000000
--- a/tests/otr/mock_otr.c
+++ /dev/null
@@ -1,97 +0,0 @@
-#include <stdarg.h>
-#include <stddef.h>
-#include <setjmp.h>
-#include <cmocka.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-
-
-#include "config.h"
-
-#ifdef HAVE_LIBOTR
-#include "otr/otr.h"
-#endif
-#include "config/account.h"
-
-#ifdef HAVE_LIBOTR
-static void
-_mock_otr_keygen(ProfAccount *account)
-{
-    check_expected(account);
-}
-
-static char *
-_mock_otr_libotr_version(void)
-{
-    return mock_ptr_type(char *);
-}
-
-static char *
-_mock_otr_get_my_fingerprint(void)
-{
-    return mock_ptr_type(char *);
-}
-
-static char *
-_mock_otr_get_their_fingerprint(const char * const recipient)
-{
-    check_expected(recipient);
-    return mock_ptr_type(char *);
-}
-
-static gboolean
-_mock_otr_key_loaded(void)
-{
-    return (gboolean)mock();
-}
-
-static char *
-_mock_otr_start_query(void)
-{
-    return mock_ptr_type(char *);
-}
-
-void
-otr_keygen_expect(ProfAccount *account)
-{
-    otr_keygen = _mock_otr_keygen;
-    expect_memory(_mock_otr_keygen, account, account, sizeof(ProfAccount));
-}
-
-void
-otr_libotr_version_returns(char *version)
-{
-    otr_libotr_version = _mock_otr_libotr_version;
-    will_return(_mock_otr_libotr_version, version);
-}
-
-void
-otr_get_my_fingerprint_returns(char *fingerprint)
-{
-    otr_get_my_fingerprint = _mock_otr_get_my_fingerprint;
-    will_return(_mock_otr_get_my_fingerprint, fingerprint);
-}
-
-void
-otr_get_their_fingerprint_expect_and_return(char *recipient, char *fingerprint)
-{
-    otr_get_their_fingerprint = _mock_otr_get_their_fingerprint;
-    expect_string(_mock_otr_get_their_fingerprint, recipient, recipient);
-    will_return(_mock_otr_get_their_fingerprint, fingerprint);
-}
-
-void
-otr_key_loaded_returns(gboolean loaded)
-{
-    otr_key_loaded = _mock_otr_key_loaded;
-    will_return(_mock_otr_key_loaded, loaded);
-}
-
-void
-otr_start_query_returns(char *query)
-{
-    otr_start_query = _mock_otr_start_query;
-    will_return(_mock_otr_start_query, query);
-}
-#endif
diff --git a/tests/otr/mock_otr.h b/tests/otr/mock_otr.h
deleted file mode 100644
index ab28ed6c..00000000
--- a/tests/otr/mock_otr.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef MOCK_OTR_H
-#define MOCK_OTR_H
-
-#include "config/account.h"
-
-void otr_keygen_expect(ProfAccount *account);
-void otr_key_loaded_returns(gboolean loaded);
-
-void otr_libotr_version_returns(char *version);
-
-void otr_get_my_fingerprint_returns(char *fingerprint);
-void otr_get_their_fingerprint_expect_and_return(char *recipient, char *fingerprint);
-
-void otr_start_query_returns(char *query);
-
-#endif