From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/eet/src/tests/eet_suite.c | 42 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'libraries/eet/src/tests/eet_suite.c') 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 @@ #include "eet_suite.h" +#define CERT_DIR ((*TESTS_SRC_DIR == '/') ? TESTS_SRC_DIR : "src/tests/" TESTS_SRC_DIR) + START_TEST(eet_test_init) { int ret; @@ -211,21 +213,21 @@ _eet_test_basic_check(Eet_Test_Basic_Type *result, fail_if(result->empty != NULL); if (i == 0) { - Eet_Test_Basic_Type *tmp; - - tmp = result->with; - fail_if(tmp == NULL); - - fail_if(tmp->c != EET_TEST_CHAR); - fail_if(tmp->s != EET_TEST_SHORT); - fail_if(tmp->i != EET_TEST_INT + i + 1); - fail_if(tmp->l != (long long)EET_TEST_LONG_LONG); - fail_if(strcmp(tmp->str, EET_TEST_STRING) != 0); - fail_if(strcmp(tmp->istr, EET_TEST_STRING) != 0); - fail_if(tmp->uc != EET_TEST_CHAR); - fail_if(tmp->us != EET_TEST_SHORT); - fail_if(tmp->ui != EET_TEST_INT); - fail_if(tmp->ul != EET_TEST_LONG_LONG); + Eet_Test_Basic_Type *tmp2; + + tmp2 = result->with; + fail_if(tmp2 == NULL); + + fail_if(tmp2->c != EET_TEST_CHAR); + fail_if(tmp2->s != EET_TEST_SHORT); + fail_if(tmp2->i != EET_TEST_INT + i + 1); + fail_if(tmp2->l != (long long)EET_TEST_LONG_LONG); + fail_if(strcmp(tmp2->str, EET_TEST_STRING) != 0); + fail_if(strcmp(tmp2->istr, EET_TEST_STRING) != 0); + fail_if(tmp2->uc != EET_TEST_CHAR); + fail_if(tmp2->us != EET_TEST_SHORT); + fail_if(tmp2->ui != EET_TEST_INT); + fail_if(tmp2->ul != EET_TEST_LONG_LONG); } else fail_if(result->with != NULL); @@ -1640,7 +1642,7 @@ START_TEST(eet_identity_simple) eet_init(); fail_if(!(file = tmpnam(file))); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); fail_if(!(noread = fopen("/dev/null", "w"))); /* Sign an eet file. */ @@ -1707,7 +1709,7 @@ START_TEST(eet_identity_open_simple) eet_init(); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); k = eet_identity_open("cert.pem", "key.pem", NULL); fail_if(!k); @@ -1725,7 +1727,7 @@ START_TEST(eet_identity_open_pkcs8) eet_init(); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); k = eet_identity_open("cert.pem", "key_enc_none.pem", NULL); fail_if(!k); @@ -1774,7 +1776,7 @@ START_TEST(eet_identity_open_pkcs8_enc) eet_init(); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); k = eet_identity_open("cert.pem", "key_enc.pem", NULL); fail_if(k); @@ -1810,7 +1812,7 @@ START_TEST(eet_cipher_decipher_simple) eet_init(); fail_if(!(file = tmpnam(file))); - fail_if(chdir("src/tests")); + fail_if(chdir(CERT_DIR)); /* Crypt an eet file. */ ef = eet_open(file, EET_FILE_MODE_WRITE); -- cgit v1.1