18 #include "../../crmcommon_private.h" 20 #define MONTHS_TO_SECONDS "months=\"2\" weeks=\"3\" days=\"-1\" " \ 21 "hours=\"1\" minutes=\"1\" seconds=\"1\" />" 23 #define ALL_VALID "<duration id=\"duration1\" years=\"1\" " MONTHS_TO_SECONDS 25 #define NO_ID "<duration years=\"1\" " MONTHS_TO_SECONDS 27 #define YEARS_INVALID "<duration id=\"duration1\" years=\"not-a-number\" " \ 31 null_invalid(
void **state)
50 nonnull_end_invalid(
void **state)
81 years_invalid(
void **state)
99 all_valid(
void **state)
116 cmocka_unit_test(null_invalid),
117 cmocka_unit_test(nonnull_end_invalid),
118 cmocka_unit_test(no_id),
119 cmocka_unit_test(years_invalid),
120 cmocka_unit_test(all_valid))
struct crm_time_s crm_time_t
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
int pcmk__xml_test_setup_group(void **state)
Wrappers for and extensions to libxml2.
G_GNUC_INTERNAL int pcmk__unpack_duration(const xmlNode *duration, const crm_time_t *start, crm_time_t **end)
void free_xml(xmlNode *child)
int pcmk__xml_test_teardown_group(void **state)
xmlNode * pcmk__xml_parse(const char *input)
int crm_time_compare(const crm_time_t *a, const crm_time_t *b)
crm_time_t * crm_time_new(const char *string)
void crm_time_free(crm_time_t *dt)