This source file includes following definitions.
- outside_limits
- inside_limits
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <crm/common/unittest_internal.h>
13
14 static void
15 outside_limits(void **state)
16 {
17 assert_string_equal(pcmk_readable_score(CRM_SCORE_INFINITY * 2),
18 CRM_INFINITY_S);
19 assert_string_equal(pcmk_readable_score(-CRM_SCORE_INFINITY * 2),
20 CRM_MINUS_INFINITY_S);
21 }
22
23 static void
24 inside_limits(void **state)
25 {
26 assert_string_equal(pcmk_readable_score(0), "0");
27 assert_string_equal(pcmk_readable_score(1024), "1024");
28 assert_string_equal(pcmk_readable_score(-1024), "-1024");
29 }
30
31 PCMK__UNIT_TEST(NULL, NULL,
32 cmocka_unit_test(outside_limits),
33 cmocka_unit_test(inside_limits))