aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/eet/src/tests/eet_suite.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-23 23:30:42 +1000
committerDavid Walter Seikel2012-01-23 23:30:42 +1000
commit825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch)
tree75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/eet/src/tests/eet_suite.c
parentAdd ability to disable the test harness, or the Lua compile test. (diff)
downloadSledjHamr-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 '')
-rw-r--r--libraries/eet/src/tests/eet_suite.c42
1 files changed, 22 insertions, 20 deletions
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
27START_TEST(eet_test_init) 29START_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);