mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
1b2322284f
* add freezing and unfreezing of peers * add rejoin packet * revise handling of temporary invited connections * rename "peer kill" packet to "peer leave" packet * test rejoining in conference test * use custom clock in conference test
33 lines
665 B
C
33 lines
665 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.
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct State {
|
|
uint32_t index;
|
|
uint64_t clock;
|
|
} 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, false);
|
|
return 0;
|
|
}
|