2018-06-25 20:37:46 +08:00
|
|
|
/* 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.
|
|
|
|
*/
|
|
|
|
|
2018-07-04 22:42:02 +08:00
|
|
|
#include <stdint.h>
|
2018-06-25 20:37:46 +08:00
|
|
|
|
|
|
|
typedef struct State {
|
|
|
|
uint32_t index;
|
2018-08-18 02:34:25 +08:00
|
|
|
uint64_t clock;
|
2018-06-25 20:37:46 +08:00
|
|
|
} 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);
|
|
|
|
|
2021-12-29 09:51:33 +08:00
|
|
|
run_auto_test(nullptr, 2, friend_connection_test, false);
|
2018-06-25 20:37:46 +08:00
|
|
|
return 0;
|
|
|
|
}
|