#include #include #include "xce/cluster_def.h" static void test_hook_detail_job_stop_exists(void) { /* HOOK_DETAIL_JOB_STOP must be defined and distinct from JOB_UPDATE */ int stop_val = (int)HOOK_DETAIL_JOB_STOP; int update_val = (int)HOOK_DETAIL_JOB_UPDATE; TEST_ASSERT_TRUE(stop_val != 0); TEST_ASSERT_TRUE(stop_val != update_val); printf("test_hook_detail_job_stop_exists: PASS\n"); } static void test_hook_detail_job_resume_exists(void) { int resume_val = (int)HOOK_DETAIL_JOB_RESUME; int update_val = (int)HOOK_DETAIL_JOB_UPDATE; TEST_ASSERT_TRUE(resume_val != 0); TEST_ASSERT_TRUE(resume_val != update_val); TEST_ASSERT_TRUE(resume_val != (int)HOOK_DETAIL_JOB_STOP); printf("test_hook_detail_job_resume_exists: PASS\n"); } static void test_hook_detail_job_stop_and_resume_are_distinct(void) { TEST_ASSERT_NOT_EQUAL((int)HOOK_DETAIL_JOB_STOP, (int)HOOK_DETAIL_JOB_RESUME); printf("test_hook_detail_job_stop_and_resume_are_distinct: PASS\n"); } void test_hooks(void) { printf("\n>> hook detail enum tests\n\n"); RUN_TEST(test_hook_detail_job_stop_exists); RUN_TEST(test_hook_detail_job_resume_exists); RUN_TEST(test_hook_detail_job_stop_and_resume_are_distinct); }