diff --git a/tests/lib/serialize.c b/tests/lib/serialize.c index d64c6008f..7e122c2c1 100644 --- a/tests/lib/serialize.c +++ b/tests/lib/serialize.c @@ -331,7 +331,7 @@ START_TEST (test_deserialize_config) mctest_assert_str_eq (actual_value, "some value "); g_free (actual_value); - ck_assert_int_eq (mc_config_get_bool (actual, "group2", "param1", FALSE), TRUE); + mctest_assert_true (mc_config_get_bool (actual, "group2", "param1", FALSE)); ck_assert_int_eq (mc_config_get_int (actual, "group2", "param2", 0), 123456); @@ -343,7 +343,7 @@ START_TEST (test_deserialize_config) mctest_assert_str_eq (actual_value, "bla-:p1:w:v2:12:g3:123:bla-bla\n"); g_free (actual_value); - ck_assert_int_eq (mc_config_get_bool (actual, "group4", "param1", TRUE), FALSE); + mctest_assert_false (mc_config_get_bool (actual, "group4", "param1", TRUE)); ck_assert_int_eq (mc_config_get_int (actual, "group4", "param2", 0), 654321); diff --git a/tests/lib/vfs/path_manipulations.c b/tests/lib/vfs/path_manipulations.c index 78ce6ae04..bb4f64dfd 100644 --- a/tests/lib/vfs/path_manipulations.c +++ b/tests/lib/vfs/path_manipulations.c @@ -391,7 +391,7 @@ START_PARAMETRIZED_TEST (test_vfs_path_relative, test_vfs_path_relative_ds) vpath = vfs_path_from_str_flags (data->input_path, VPF_NO_CANON); /* then */ - ck_assert_int_eq (vpath->relative, TRUE); + mctest_assert_true (vpath->relative); mctest_assert_str_eq (vfs_path_get_last_path_str (vpath), data->expected_last_path_in_element); mctest_assert_str_eq (vfs_path_as_str (vpath), data->expected_path); @@ -418,7 +418,7 @@ START_PARAMETRIZED_TEST (test_vfs_path_relative_clone, test_vfs_path_relative_ds cloned_vpath = vfs_path_clone (vpath); /* then */ - ck_assert_int_eq (cloned_vpath->relative, TRUE); + mctest_assert_true (cloned_vpath->relative); mctest_assert_str_eq (vfs_path_get_last_path_str (cloned_vpath), data->expected_last_path_in_element); mctest_assert_str_eq (vfs_path_as_str (cloned_vpath), data->expected_path); diff --git a/tests/mctest.h b/tests/mctest.h index aed83b1d7..63d8ca735 100644 --- a/tests/mctest.h +++ b/tests/mctest.h @@ -55,7 +55,7 @@ #define mctest_assert_false(actual_pointer) { \ ck_assert_msg( \ (int) actual_pointer == 0, \ - "%s variable should be TRUE", #actual_pointer \ + "%s variable should be FALSE", #actual_pointer \ ); \ } diff --git a/tests/src/execute__execute_external_editor_or_viewer.c b/tests/src/execute__execute_external_editor_or_viewer.c index 511a8f3f1..738e9e231 100644 --- a/tests/src/execute__execute_external_editor_or_viewer.c +++ b/tests/src/execute__execute_external_editor_or_viewer.c @@ -156,8 +156,8 @@ START_TEST (do_open_external_editor_or_viewer) /* check call to execute_get_external_cmd_opts_from_config() */ mctest_assert_str_eq (execute_external_cmd_opts__command__captured, "editor_or_viewer"); - ck_assert_int_eq (vfs_path_equal - (execute_external_cmd_opts__filename_vpath__captured, filename_vpath), TRUE); + mctest_assert_true (vfs_path_equal + (execute_external_cmd_opts__filename_vpath__captured, filename_vpath)); ck_assert_int_eq (execute_external_cmd_opts__start_line__captured, 123); /* check call to do_executev() */ diff --git a/tests/src/execute__execute_with_vfs_arg.c b/tests/src/execute__execute_with_vfs_arg.c index d381da6e5..01a0cc253 100644 --- a/tests/src/execute__execute_with_vfs_arg.c +++ b/tests/src/execute__execute_with_vfs_arg.c @@ -70,9 +70,8 @@ START_PARAMETRIZED_TEST (the_file_is_local, the_file_is_local_ds) const vfs_path_t *tmp_vpath; tmp_vpath = (data->input_path == NULL) ? vfs_get_raw_current_dir () : filename_vpath; - ck_assert_int_eq (vfs_path_equal - (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), - tmp_vpath), TRUE); + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), tmp_vpath)); } ck_assert_int_eq (do_execute__flags__captured, EXECUTE_INTERNAL); ck_assert_msg (mc_getlocalcopy__pathname_vpath__captured == NULL, @@ -106,9 +105,9 @@ START_TEST (the_file_is_remote_but_empty) ck_assert_int_eq (vfs_file_is_local__vpath__captured->len, 2); - ck_assert_int_eq (vfs_path_equal - (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), - vfs_get_raw_current_dir ()), TRUE); + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), + vfs_get_raw_current_dir ())); ck_assert_msg (g_ptr_array_index (vfs_file_is_local__vpath__captured, 1) == NULL, "\nParameter for second call to vfs_file_is_local() should be NULL!"); ck_assert_msg (mc_getlocalcopy__pathname_vpath__captured == NULL, @@ -144,12 +143,11 @@ START_TEST (the_file_is_remote_fail_to_create_local_copy) ck_assert_int_eq (vfs_file_is_local__vpath__captured->len, 1); - ck_assert_int_eq (vfs_path_equal - (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), - filename_vpath), TRUE); + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), + filename_vpath)); - ck_assert_int_eq (vfs_path_equal - (mc_getlocalcopy__pathname_vpath__captured, filename_vpath), TRUE); + mctest_assert_true (vfs_path_equal (mc_getlocalcopy__pathname_vpath__captured, filename_vpath)); mctest_assert_str_eq (message_title__captured, _("Error")); mctest_assert_str_eq (message_text__captured, @@ -188,25 +186,24 @@ START_TEST (the_file_is_remote) ck_assert_int_eq (vfs_file_is_local__vpath__captured->len, 1); - ck_assert_int_eq (vfs_path_equal - (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), - filename_vpath), TRUE); + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (vfs_file_is_local__vpath__captured, 0), + filename_vpath)); - ck_assert_int_eq (vfs_path_equal - (mc_getlocalcopy__pathname_vpath__captured, filename_vpath), TRUE); + mctest_assert_true (vfs_path_equal (mc_getlocalcopy__pathname_vpath__captured, filename_vpath)); ck_assert_int_eq (mc_stat__vpath__captured->len, 2); - ck_assert_int_eq (vfs_path_equal - (g_ptr_array_index (mc_stat__vpath__captured, 0), local_vpath), TRUE); - ck_assert_int_eq (vfs_path_equal - (g_ptr_array_index (mc_stat__vpath__captured, 0), - g_ptr_array_index (mc_stat__vpath__captured, 1)), TRUE); + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (mc_stat__vpath__captured, 0), local_vpath)); + mctest_assert_true (vfs_path_equal + (g_ptr_array_index (mc_stat__vpath__captured, 0), + g_ptr_array_index (mc_stat__vpath__captured, 1))); - ck_assert_int_eq (vfs_path_equal - (mc_ungetlocalcopy__pathname_vpath__captured, filename_vpath), TRUE); + mctest_assert_true (vfs_path_equal + (mc_ungetlocalcopy__pathname_vpath__captured, filename_vpath)); - ck_assert_int_eq (vfs_path_equal (mc_ungetlocalcopy__local_vpath__captured, local_vpath), TRUE); + mctest_assert_true (vfs_path_equal (mc_ungetlocalcopy__local_vpath__captured, local_vpath)); vfs_path_free (filename_vpath, TRUE); vfs_path_free (local_vpath, TRUE);