diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/eet/src/tests | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/eet/src/tests')
-rw-r--r-- | libraries/eet/src/tests/Makefile.am | 1 | ||||
-rw-r--r-- | libraries/eet/src/tests/Makefile.in | 3 | ||||
-rw-r--r-- | libraries/eet/src/tests/eet_suite.c | 42 |
3 files changed, 24 insertions, 22 deletions
diff --git a/libraries/eet/src/tests/Makefile.am b/libraries/eet/src/tests/Makefile.am index c90a1d5..61158f7 100644 --- a/libraries/eet/src/tests/Makefile.am +++ b/libraries/eet/src/tests/Makefile.am | |||
@@ -2,6 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in | |||
2 | 2 | ||
3 | AM_CPPFLAGS = \ | 3 | AM_CPPFLAGS = \ |
4 | -I$(top_srcdir)/src/lib \ | 4 | -I$(top_srcdir)/src/lib \ |
5 | -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests\" \ | ||
5 | @CHECK_CFLAGS@ \ | 6 | @CHECK_CFLAGS@ \ |
6 | @EINA_CFLAGS@ | 7 | @EINA_CFLAGS@ |
7 | 8 | ||
diff --git a/libraries/eet/src/tests/Makefile.in b/libraries/eet/src/tests/Makefile.in index bb15127..791f9fd 100644 --- a/libraries/eet/src/tests/Makefile.in +++ b/libraries/eet/src/tests/Makefile.in | |||
@@ -174,8 +174,6 @@ PACKAGE_URL = @PACKAGE_URL@ | |||
174 | PACKAGE_VERSION = @PACKAGE_VERSION@ | 174 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
175 | PATH_SEPARATOR = @PATH_SEPARATOR@ | 175 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
176 | PKG_CONFIG = @PKG_CONFIG@ | 176 | PKG_CONFIG = @PKG_CONFIG@ |
177 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
178 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
179 | RANLIB = @RANLIB@ | 177 | RANLIB = @RANLIB@ |
180 | SED = @SED@ | 178 | SED = @SED@ |
181 | SET_MAKE = @SET_MAKE@ | 179 | SET_MAKE = @SET_MAKE@ |
@@ -246,6 +244,7 @@ version_info = @version_info@ | |||
246 | MAINTAINERCLEANFILES = Makefile.in | 244 | MAINTAINERCLEANFILES = Makefile.in |
247 | AM_CPPFLAGS = \ | 245 | AM_CPPFLAGS = \ |
248 | -I$(top_srcdir)/src/lib \ | 246 | -I$(top_srcdir)/src/lib \ |
247 | -DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests\" \ | ||
249 | @CHECK_CFLAGS@ \ | 248 | @CHECK_CFLAGS@ \ |
250 | @EINA_CFLAGS@ | 249 | @EINA_CFLAGS@ |
251 | 250 | ||
diff --git a/libraries/eet/src/tests/eet_suite.c b/libraries/eet/src/tests/eet_suite.c index 5230c86..3bbc912 100644 --- a/libraries/eet/src/tests/eet_suite.c +++ b/libraries/eet/src/tests/eet_suite.c | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | #include "eet_suite.h" | 25 | #include "eet_suite.h" |
26 | 26 | ||
27 | #define CERT_DIR ((*TESTS_SRC_DIR == '/') ? TESTS_SRC_DIR : "src/tests/" TESTS_SRC_DIR) | ||
28 | |||
27 | START_TEST(eet_test_init) | 29 | START_TEST(eet_test_init) |
28 | { | 30 | { |
29 | int ret; | 31 | int ret; |
@@ -211,21 +213,21 @@ _eet_test_basic_check(Eet_Test_Basic_Type *result, | |||
211 | fail_if(result->empty != NULL); | 213 | fail_if(result->empty != NULL); |
212 | if (i == 0) | 214 | if (i == 0) |
213 | { | 215 | { |
214 | Eet_Test_Basic_Type *tmp; | 216 | Eet_Test_Basic_Type *tmp2; |
215 | 217 | ||
216 | tmp = result->with; | 218 | tmp2 = result->with; |
217 | fail_if(tmp == NULL); | 219 | fail_if(tmp2 == NULL); |
218 | 220 | ||
219 | fail_if(tmp->c != EET_TEST_CHAR); | 221 | fail_if(tmp2->c != EET_TEST_CHAR); |
220 | fail_if(tmp->s != EET_TEST_SHORT); | 222 | fail_if(tmp2->s != EET_TEST_SHORT); |
221 | fail_if(tmp->i != EET_TEST_INT + i + 1); | 223 | fail_if(tmp2->i != EET_TEST_INT + i + 1); |
222 | fail_if(tmp->l != (long long)EET_TEST_LONG_LONG); | 224 | fail_if(tmp2->l != (long long)EET_TEST_LONG_LONG); |
223 | fail_if(strcmp(tmp->str, EET_TEST_STRING) != 0); | 225 | fail_if(strcmp(tmp2->str, EET_TEST_STRING) != 0); |
224 | fail_if(strcmp(tmp->istr, EET_TEST_STRING) != 0); | 226 | fail_if(strcmp(tmp2->istr, EET_TEST_STRING) != 0); |
225 | fail_if(tmp->uc != EET_TEST_CHAR); | 227 | fail_if(tmp2->uc != EET_TEST_CHAR); |
226 | fail_if(tmp->us != EET_TEST_SHORT); | 228 | fail_if(tmp2->us != EET_TEST_SHORT); |
227 | fail_if(tmp->ui != EET_TEST_INT); | 229 | fail_if(tmp2->ui != EET_TEST_INT); |
228 | fail_if(tmp->ul != EET_TEST_LONG_LONG); | 230 | fail_if(tmp2->ul != EET_TEST_LONG_LONG); |
229 | } | 231 | } |
230 | else | 232 | else |
231 | fail_if(result->with != NULL); | 233 | fail_if(result->with != NULL); |
@@ -1640,7 +1642,7 @@ START_TEST(eet_identity_simple) | |||
1640 | eet_init(); | 1642 | eet_init(); |
1641 | 1643 | ||
1642 | fail_if(!(file = tmpnam(file))); | 1644 | fail_if(!(file = tmpnam(file))); |
1643 | fail_if(chdir("src/tests")); | 1645 | fail_if(chdir(CERT_DIR)); |
1644 | fail_if(!(noread = fopen("/dev/null", "w"))); | 1646 | fail_if(!(noread = fopen("/dev/null", "w"))); |
1645 | 1647 | ||
1646 | /* Sign an eet file. */ | 1648 | /* Sign an eet file. */ |
@@ -1707,7 +1709,7 @@ START_TEST(eet_identity_open_simple) | |||
1707 | 1709 | ||
1708 | eet_init(); | 1710 | eet_init(); |
1709 | 1711 | ||
1710 | fail_if(chdir("src/tests")); | 1712 | fail_if(chdir(CERT_DIR)); |
1711 | 1713 | ||
1712 | k = eet_identity_open("cert.pem", "key.pem", NULL); | 1714 | k = eet_identity_open("cert.pem", "key.pem", NULL); |
1713 | fail_if(!k); | 1715 | fail_if(!k); |
@@ -1725,7 +1727,7 @@ START_TEST(eet_identity_open_pkcs8) | |||
1725 | 1727 | ||
1726 | eet_init(); | 1728 | eet_init(); |
1727 | 1729 | ||
1728 | fail_if(chdir("src/tests")); | 1730 | fail_if(chdir(CERT_DIR)); |
1729 | 1731 | ||
1730 | k = eet_identity_open("cert.pem", "key_enc_none.pem", NULL); | 1732 | k = eet_identity_open("cert.pem", "key_enc_none.pem", NULL); |
1731 | fail_if(!k); | 1733 | fail_if(!k); |
@@ -1774,7 +1776,7 @@ START_TEST(eet_identity_open_pkcs8_enc) | |||
1774 | 1776 | ||
1775 | eet_init(); | 1777 | eet_init(); |
1776 | 1778 | ||
1777 | fail_if(chdir("src/tests")); | 1779 | fail_if(chdir(CERT_DIR)); |
1778 | 1780 | ||
1779 | k = eet_identity_open("cert.pem", "key_enc.pem", NULL); | 1781 | k = eet_identity_open("cert.pem", "key_enc.pem", NULL); |
1780 | fail_if(k); | 1782 | fail_if(k); |
@@ -1810,7 +1812,7 @@ START_TEST(eet_cipher_decipher_simple) | |||
1810 | eet_init(); | 1812 | eet_init(); |
1811 | 1813 | ||
1812 | fail_if(!(file = tmpnam(file))); | 1814 | fail_if(!(file = tmpnam(file))); |
1813 | fail_if(chdir("src/tests")); | 1815 | fail_if(chdir(CERT_DIR)); |
1814 | 1816 | ||
1815 | /* Crypt an eet file. */ | 1817 | /* Crypt an eet file. */ |
1816 | ef = eet_open(file, EET_FILE_MODE_WRITE); | 1818 | ef = eet_open(file, EET_FILE_MODE_WRITE); |