X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Ftests%2Fsession%2Ftest-session.c;h=acdfcef403c8ad915a1bda27194e99a6bab1eb81;hb=refs%2Fchanges%2F49%2F23149%2F1;hp=58e5753671fcb1ee686a3b8b2b256503040b49c3;hpb=f6a6c26058c8b6ca7500c84ffe13ca2b2dc8b49e;p=src%2Fapp-framework-binder.git diff --git a/src/tests/session/test-session.c b/src/tests/session/test-session.c index 58e57536..acdfcef4 100644 --- a/src/tests/session/test-session.c +++ b/src/tests/session/test-session.c @@ -53,19 +53,10 @@ START_TEST (check_creation) /* the session is valid */ ck_assert(afb_session_uuid(s) != NULL); - ck_assert(afb_session_token(s) != NULL); ck_assert(!afb_session_is_closed(s)); - + /* token is the initial one */ - ck_assert_str_eq(afb_session_token(s), GOOD_UUID); ck_assert(afb_session_check_token(s, GOOD_UUID)); - ck_assert(afb_session_check_token(s, afb_session_token(s))); - - /* token can be renewed */ - afb_session_new_token(s); - ck_assert(strcmp(afb_session_token(s), GOOD_UUID)); - ck_assert(!afb_session_check_token(s, GOOD_UUID)); - ck_assert(afb_session_check_token(s, afb_session_token(s))); /* query the session */ uuid = strdup(afb_session_uuid(s)); @@ -187,6 +178,7 @@ END_TEST /*********************************************************************/ /* check hooking */ +#if WITH_AFB_HOOK int hookflag; void on_create(void *closure, const struct afb_hookid *hookid, struct afb_session *session) @@ -299,6 +291,8 @@ START_TEST (check_hooking) } END_TEST +#endif + /*********************************************************************/ @@ -327,6 +321,8 @@ int main(int ac, char **av) addtest(check_creation); addtest(check_capacity); addtest(check_cookies); +#if WITH_AFB_HOOK addtest(check_hooking); +#endif return !!srun(); }