27 const gchar *suite_name,
qev_fd_t test_socket()
Get a new socket connected to localhost on the test's port.
void test_setup_with_config(gchar *config)
Setup the server including the given config path.
gboolean test_do(SRunner *sr)
Runs a test and returns if everything passed.
qev_fd_t test_client()
Get a client connected to QIO.
void test_setup()
A checked fixture: starts up QIO and gets everything ready for a test.
void test_teardown()
A checked teardown: tears down QIO and frees up all memory used.
void test_send_len(qev_fd_t tc, const gchar *data, const guint64 len)
Send a message from the client to the server.
void test_close(qev_fd_t tc)
Close and free up any resources the client was using.
void test_ping(qev_fd_t tc)
Tests that the client is alive by pinging the server.
void test_config_rm()
Remove the created configuration file.
void test_heartbeat()
Force send out heartbeats.
Everything that a client needs to function.
Definition: client.h:100
void test_client_dead(qev_fd_t tc)
Tests that the client was closed by the server.
guint64 test_recv(qev_fd_t tc, gchar *data, const guint64 len)
Receive a message from the server to the client.
void test_msg(qev_fd_t tc, const gchar *data)
Tests that the received message is what is given.
void test_send(qev_fd_t tc, const gchar *data)
Send a message from the client to the server.
Every header, definition, and whatnot QuickIO needs to run.
struct client * test_get_client_raw()
Get the last client in the clients list, not waiting for it to be handshaked or anything.
int qev_fd_t
Sockets are just ints.
Definition: qev.h:170
void test_cb(qev_fd_t tc, const gchar *msg, const gchar *data)
Tests that the given callback is recieved in response to the message.
Older versions of check don't support the new macros; this file just monkeys them onto it...
void test_config()
Create the default test config file.
void test_wait_for_buff(const guint len)
Waits for all of the connected clients to have userspace buffers.
void test_new(const gchar *suite_name, SRunner **sr, Suite **s)
Create a new test suite, ready for running.
struct client * test_get_client()
Get the last client in the clients list.