chiark / gitweb /
test-path-util: use assert_se in all assertions
[elogind.git] / src / test / test-util.c
index b74abac1541ed14372a9804b1f6e1d2fbc62ee72..34d5f2ed7d235be3510ca49c66eaccc1f9197195 100644 (file)
@@ -85,12 +85,15 @@ static void test_max(void) {
         /* CONST_MAX returns (void) instead of a value if the passed arguments
          * are not of the same type or not constant expressions. */
         assert_cc(__builtin_types_compatible_p(typeof(CONST_MAX(1, 10)), int));
-        assert_cc(__builtin_types_compatible_p(typeof(CONST_MAX(d, 10)), void));
         assert_cc(__builtin_types_compatible_p(typeof(CONST_MAX(1, 1U)), void));
 
         assert_se(val1.a == 100);
         assert_se(MAX(++d, 0) == 1);
         assert_se(d == 1);
+
+        assert_cc(MAXSIZE(char[3], uint16_t) == 3);
+        assert_cc(MAXSIZE(char[3], uint32_t) == 4);
+        assert_cc(MAXSIZE(char, long) == sizeof(long));
 }
 
 static void test_first_word(void) {