toxcore/auto_tests/friend_connection_test.c
iphydf 597f23bdd9
Use run_auto_test.h test fixture for some auto-tests.
Most of the auto-tests should use this fixture, but I've only done a few
to set an example.
2018-07-05 23:41:27 +00:00

32 lines
645 B
C

/* Tests that we can make a friend connection.
*
* This is the simplest test that brings up two toxes that can talk to each
* other. It's useful as a copy/pasteable starting point for testing other
* features.
*/
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
#include <stdint.h>
typedef struct State {
uint32_t index;
} State;
#include "run_auto_test.h"
static void friend_connection_test(Tox **toxes, State *state)
{
// Nothing to do here. When copying this test, add test-specific code here.
}
int main(void)
{
setvbuf(stdout, nullptr, _IONBF, 0);
run_auto_test(2, friend_connection_test);
return 0;
}