chiark / gitweb /
man: reword sd-hibernate-resume description and add link
[elogind.git] / src / test / test-util.c
index b74abac1541ed14372a9804b1f6e1d2fbc62ee72..4d9b28f9c8e7b82aca0440a0b2c56c8d86b06789 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) {
@@ -860,7 +863,7 @@ static void test_readlink_and_make_absolute(void) {
         char name_alias[] = "/tmp/test-readlink_and_make_absolute-alias";
         char *r = NULL;
 
-        assert(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
+        assert_se(mkdir_safe(tempdir, 0755, getuid(), getgid()) >= 0);
         assert_se(touch(name) >= 0);
 
         assert_se(symlink(name, name_alias) >= 0);