Exemplo n.º 1
0
END_TEST

static Suite *network_suite(void)
{
    Suite *s = suite_create("Network");

    DEFTESTCASE(addr_resolv_localhost);
    DEFTESTCASE(ip_equal);

    return s;
}
Exemplo n.º 2
0
END_TEST
#endif

Suite *dht_suite(void)
{
    Suite *s = suite_create("DHT");

    DEFTESTCASE(addto_lists_ipv4);
#if TOX_ENABLE_IPV6_DEFAULT == 1
    DEFTESTCASE(addto_lists_ipv6);
#endif
    return s;
}
Exemplo n.º 3
0
END_TEST


static Suite *tox_suite(void)
{
    Suite *s = suite_create("Tox many tcp");

    /* Each tox connects to a single tox TCP    */
    DEFTESTCASE(many_clients_tcp);

    /* Try to make a connection to each "older sibling" tox instance via TCP */
    DEFTESTCASE(many_clients_tcp_b);

    return s;
}
Exemplo n.º 4
0
END_TEST

Suite *crypto_suite(void)
{
    Suite *s = suite_create("Crypto");

    DEFTESTCASE(known);
    DEFTESTCASE(fast_known);
    DEFTESTCASE_SLOW(endtoend, 15); /* waiting up to 15 seconds */
    DEFTESTCASE(large_data);
    DEFTESTCASE(large_data_symmetric);
    DEFTESTCASE_SLOW(increment_nonce, 20);

    return s;
}
Exemplo n.º 5
0
END_TEST

#define DEFTESTCASE(NAME) \
    TCase *tc_##NAME = tcase_create(#NAME); \
    tcase_add_test(tc_##NAME, test_##NAME); \
    suite_add_tcase(s, tc_##NAME);

Suite *network_suite(void)
{
    Suite *s = suite_create("Network");

    DEFTESTCASE(addr_resolv_localhost);
    DEFTESTCASE(ip_equal);

    return s;
}
Exemplo n.º 6
0
END_TEST

Suite *creativesuitenamegoeshere_suite(void)
{
    Suite *s = suite_create("creativesuitedescritptiongoeshere");

    DEFTESTCASE(/* remove test_ from test function names */ creativetestnamegoeshere);

    return s;
}
Exemplo n.º 7
0
END_TEST

#define DEFTESTCASE(NAME) \
    TCase *tc_##NAME = tcase_create(#NAME); \
    tcase_add_test(tc_##NAME, test_##NAME); \
    suite_add_tcase(s, tc_##NAME);

#define DEFTESTCASE_SLOW(NAME, TIMEOUT) \
    DEFTESTCASE(NAME) \
    tcase_set_timeout(tc_##NAME, TIMEOUT);

Suite *Assoc_suite(void)
{
    Suite *s = suite_create("Assoc");

    DEFTESTCASE(basics);
    DEFTESTCASE(fillup);
    return s;
}
Exemplo n.º 8
0
END_TEST

static Suite *tox_strncasecmp_suite(void)
{
    Suite *s = suite_create("tox_strncasecmp");

    DEFTESTCASE(general);

    return s;
}
Exemplo n.º 9
0
END_TEST

Suite * encryptsave_suite(void)
{
    Suite *s = suite_create("encryptsave");

    DEFTESTCASE_SLOW(known_kdf, 60); /* is 5-10 seconds on my computer, but is directly dependent on CPU */
    DEFTESTCASE(save_friend);

    return s;
}
Exemplo n.º 10
0
END_TEST


#define DEFTESTCASE(NAME) \
    TCase *NAME = tcase_create(#NAME); \
    tcase_add_test(NAME, test_##NAME); \
    suite_add_tcase(s, NAME);

#define DEFTESTCASE_SLOW(NAME, TIMEOUT) \
    DEFTESTCASE(NAME) \
    tcase_set_timeout(NAME, TIMEOUT);

Suite *crypto_suite(void)
{
    Suite *s = suite_create("Crypto");

    DEFTESTCASE(known);
    DEFTESTCASE(fast_known);
    DEFTESTCASE_SLOW(endtoend, 15); /* waiting up to 15 seconds */
    DEFTESTCASE(large_data);
    DEFTESTCASE(large_data_symmetric);

    return s;
}
Exemplo n.º 11
0
END_TEST

static Suite* toxIdSuite(void)
{
    Suite* s = suite_create("ToxId");

    DEFTESTCASE(toString);
    DEFTESTCASE(equal);
    DEFTESTCASE(notEqual);
    DEFTESTCASE(clear);
    DEFTESTCASE(copy);
    DEFTESTCASE(validation);

    return s;
}
Exemplo n.º 12
0
END_TEST

Suite *messenger_suite(void)
{
    Suite *s = suite_create("Messenger");

    DEFTESTCASE(dht_state_saveloadsave);
    DEFTESTCASE(messenger_state_saveloadsave);

    DEFTESTCASE(getself_name);
    DEFTESTCASE(m_get_userstatus_size);
    DEFTESTCASE(m_set_userstatus);

    /* DEFTESTCASE(m_addfriend); */
    DEFTESTCASE(m_friend_exists);
    DEFTESTCASE(m_get_friend_connectionstatus);
    DEFTESTCASE(m_delfriend);

    DEFTESTCASE(setname);
    DEFTESTCASE(getname);
    DEFTESTCASE(m_sendmesage);

    return s;
}
Exemplo n.º 13
0
END_TEST

#define DEFTESTCASE(NAME) \
    TCase *tc_##NAME = tcase_create(#NAME); \
    tcase_add_test(tc_##NAME, test_##NAME); \
    suite_add_tcase(s, tc_##NAME);

Suite *messenger_suite(void)
{
    Suite *s = suite_create("Messenger");

    DEFTESTCASE(dht_state_saveloadsave);
    DEFTESTCASE(messenger_state_saveloadsave);

    DEFTESTCASE(getself_name);
    DEFTESTCASE(m_get_userstatus_size);
    DEFTESTCASE(m_set_userstatus);

    /* DEFTESTCASE(m_addfriend); */
    DEFTESTCASE(m_friend_exists);
    DEFTESTCASE(m_get_friend_connectionstatus);
    DEFTESTCASE(m_delfriend);

    DEFTESTCASE(setname);
    DEFTESTCASE(getname);
    DEFTESTCASE(m_sendmesage);

    return s;
}