Rename C++ header files to .hpp
[lttng-tools.git] / tests / unit / test_utils_expand_path.cpp
index 428acad2285191827a65232ce6bf1bc6e7e94bf7..3cb1a81604c585ae12fe898ebbb0109deffb8586 100644 (file)
@@ -15,8 +15,9 @@
 
 #include <tap/tap.h>
 
-#include <common/utils.h>
-#include <common/common.h>
+#include <common/utils.hpp>
+#include <common/path.hpp>
+#include <common/common.hpp>
 
 /* For error.h */
 int lttng_opt_quiet = 1;
@@ -271,7 +272,7 @@ static void test_utils_expand_path(void)
 
                result = utils_expand_path(valid_tests_inputs[i].input);
                ok(result != NULL &&
-                               strcmp(result, valid_tests_expected_results[i]) == 0, name);
+                       strcmp(result, valid_tests_expected_results[i]) == 0, "%s", name);
 
                free(result);
        }
@@ -301,12 +302,12 @@ static void test_utils_expand_path(void)
                        PRINT_ERR("truncation occurred while concatenating paths \"%s\" and \"%s\"",
                                        real_tree_origin,
                                        symlink_tests_inputs[i].input);
-                       fail(name);
+                       fail("%s", name);
                        continue;
                }
                result = utils_expand_path(tmppath);
                ok(result != NULL && strcmp(result + treelen,
-                                       symlink_tests_inputs[i].expected_result) == 0, name);
+                       symlink_tests_inputs[i].expected_result) == 0, "%s", name);
 
                free(result);
        }
@@ -322,11 +323,11 @@ static void test_utils_expand_path(void)
                if (result != NULL) {
                        free(result);
                }
-               ok(result == NULL, name);
+               ok(result == NULL, "%s", name);
        }
 }
 
-int main(int argc, char **argv)
+int main(void)
 {
        if (prepare_symlink_tree() != 0) {
                goto error_mkdir;
This page took 0.024477 seconds and 4 git commands to generate.