add simple ecore_con_url test suite

This commit is contained in:
Mike Blumenkrantz 2014-07-28 09:47:48 -04:00
parent 9c5d565d2b
commit 89d0e9f033
4 changed files with 51 additions and 0 deletions

View File

@ -183,6 +183,7 @@ tests_ecore_ecore_suite_SOURCES = \
tests/ecore/ecore_suite.c \
tests/ecore/ecore_test_ecore.c \
tests/ecore/ecore_test_ecore_con.c \
tests/ecore/ecore_test_ecore_con_url.c \
tests/ecore/ecore_test_ecore_x.c \
tests/ecore/ecore_test_ecore_imf.c \
tests/ecore/ecore_test_timer.c \

View File

@ -20,6 +20,7 @@ struct _Ecore_Test_Case
static const Ecore_Test_Case etc[] = {
{ "Ecore", ecore_test_ecore },
{ "Ecore_Con", ecore_test_ecore_con },
{ "Ecore_Con_Url", ecore_test_ecore_con_url },
{ "Ecore_X", ecore_test_ecore_x },
{ "Ecore_Imf", ecore_test_ecore_imf },
#if HAVE_ECORE_AUDIO

View File

@ -5,6 +5,7 @@
void ecore_test_ecore(TCase *tc);
void ecore_test_ecore_con(TCase *tc);
void ecore_test_ecore_con_url(TCase *tc);
void ecore_test_ecore_x(TCase *tc);
void ecore_test_ecore_imf(TCase *tc);
void ecore_test_ecore_audio(TCase *tc);

View File

@ -0,0 +1,48 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "ecore_suite.h"
#include <stdio.h>
#include <Ecore_Con.h>
START_TEST(ecore_test_ecore_con_url_create)
{
Ecore_Con_Url *url;
int ret;
ret = eina_init();
fail_if(ret != 1);
ret = ecore_con_url_init();
fail_if(ret != 1);
url = ecore_con_url_new("http://google.com");
fail_if(!url);
ecore_con_url_free(url);
ret = ecore_con_url_shutdown();
fail_if(ret != 0);
ret = eina_shutdown();
}
END_TEST
START_TEST(ecore_test_ecore_con_url_init)
{
int ret;
ret = ecore_con_url_init();
fail_if(ret != 1);
ret = ecore_con_url_shutdown();
fail_if(ret != 0);
}
END_TEST
void ecore_test_ecore_con_url(TCase *tc)
{
tcase_add_test(tc, ecore_test_ecore_con_url_init);
tcase_add_test(tc, ecore_test_ecore_con_url_create);
}