mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-04 06:49:57 +00:00
general: remove self-checking functionality
All self-checking tests were converted into unittests. Remove the "--check" parameter along with all code related to self-checking.
This commit is contained in:
parent
d96d968ee2
commit
8c21a037fc
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
G_DEBUG=fatal-warnings ./check-program --sm-disable
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
/* check-program.c: A simple driver for eel self checks.
|
||||
*
|
||||
* Copyright (C) 2000 Eazel, Inc.
|
||||
*
|
||||
* The Gnome Library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* The Gnome Library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with the Gnome Library; see the file COPYING.LIB. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Ramiro Estrugo <ramiro@eazel.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <eel/eel-debug.h>
|
||||
#include <eel/eel-lib-self-check-functions.h>
|
||||
#include <eel/eel-self-checks.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
#if !defined (EEL_OMIT_SELF_CHECK)
|
||||
|
||||
eel_make_warnings_and_criticals_stop_in_debugger ();
|
||||
|
||||
|
||||
LIBXML_TEST_VERSION
|
||||
gtk_init ();
|
||||
|
||||
/* Run the checks for eel twice. */
|
||||
|
||||
eel_run_lib_self_checks ();
|
||||
eel_exit_if_self_checks_failed ();
|
||||
|
||||
eel_run_lib_self_checks ();
|
||||
eel_exit_if_self_checks_failed ();
|
||||
|
||||
eel_debug_shut_down ();
|
||||
|
||||
#endif /* !EEL_OMIT_SELF_CHECK */
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* eel-lib-self-check-functions.c: Wrapper for all self check functions
|
||||
* in Eel proper.
|
||||
*
|
||||
* Copyright (C) 2000 Eazel, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Darin Adler <darin@eazel.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if !defined (EEL_OMIT_SELF_CHECK)
|
||||
|
||||
#include "eel-lib-self-check-functions.h"
|
||||
|
||||
void
|
||||
eel_run_lib_self_checks (void)
|
||||
{
|
||||
EEL_LIB_FOR_EACH_SELF_CHECK_FUNCTION (EEL_CALL_SELF_CHECK_FUNCTION)
|
||||
}
|
||||
|
||||
#endif /* ! EEL_OMIT_SELF_CHECK */
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
eel-lib-self-check-functions.h: Wrapper and prototypes for all
|
||||
self-check functions in libeel.
|
||||
|
||||
Copyright (C) 2000 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Darin Adler <darin@eazel.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "eel-self-checks.h"
|
||||
|
||||
void eel_run_lib_self_checks (void);
|
||||
|
||||
/* Putting the prototypes for these self-check functions in each
|
||||
header file for the files they are defined in would make compiling
|
||||
the self-check framework take way too long (since one file would
|
||||
have to include everything).
|
||||
|
||||
So we put the list of functions here instead.
|
||||
|
||||
Instead of just putting prototypes here, we put this macro that
|
||||
can be used to do operations on the whole list of functions.
|
||||
*/
|
||||
|
||||
#define EEL_LIB_FOR_EACH_SELF_CHECK_FUNCTION(macro) \
|
||||
macro (eel_self_check_string) \
|
||||
/* Add new self-check functions to the list above this line. */
|
||||
|
||||
/* Generate prototypes for all the functions. */
|
||||
EEL_LIB_FOR_EACH_SELF_CHECK_FUNCTION (EEL_SELF_CHECK_FUNCTION_PROTOTYPE)
|
|
@ -1,165 +0,0 @@
|
|||
/*
|
||||
* eel-self-checks.c: The self-check framework.
|
||||
*
|
||||
* Copyright (C) 1999 Eazel, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Darin Adler <darin@eazel.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if !defined (EEL_OMIT_SELF_CHECK)
|
||||
|
||||
#include "eel-self-checks.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static gboolean failed;
|
||||
|
||||
static const char *current_expression;
|
||||
static const char *current_file_name;
|
||||
static int current_line_number;
|
||||
|
||||
void
|
||||
eel_exit_if_self_checks_failed (void)
|
||||
{
|
||||
if (!failed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
printf ("\n");
|
||||
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
void
|
||||
eel_report_check_failure (char *result,
|
||||
char *expected)
|
||||
{
|
||||
if (!failed)
|
||||
{
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
fprintf (stderr, "FAIL: check failed in %s, line %d\n", current_file_name, current_line_number);
|
||||
fprintf (stderr, " evaluated: %s\n", current_expression);
|
||||
fprintf (stderr, " expected: %s\n", expected == NULL ? "NULL" : expected);
|
||||
fprintf (stderr, " got: %s\n", result == NULL ? "NULL" : result);
|
||||
|
||||
failed = TRUE;
|
||||
|
||||
g_free (result);
|
||||
g_free (expected);
|
||||
}
|
||||
|
||||
static char *
|
||||
eel_strdup_boolean (gboolean boolean)
|
||||
{
|
||||
if (boolean == FALSE)
|
||||
{
|
||||
return g_strdup ("FALSE");
|
||||
}
|
||||
if (boolean == TRUE)
|
||||
{
|
||||
return g_strdup ("TRUE");
|
||||
}
|
||||
return g_strdup_printf ("gboolean(%d)", boolean);
|
||||
}
|
||||
|
||||
void
|
||||
eel_before_check (const char *expression,
|
||||
const char *file_name,
|
||||
int line_number)
|
||||
{
|
||||
current_expression = expression;
|
||||
current_file_name = file_name;
|
||||
current_line_number = line_number;
|
||||
}
|
||||
|
||||
void
|
||||
eel_after_check (void)
|
||||
{
|
||||
/* It would be good to check here if there was a memory leak. */
|
||||
}
|
||||
|
||||
void
|
||||
eel_check_boolean_result (gboolean result,
|
||||
gboolean expected)
|
||||
{
|
||||
if (result != expected)
|
||||
{
|
||||
eel_report_check_failure (eel_strdup_boolean (result),
|
||||
eel_strdup_boolean (expected));
|
||||
}
|
||||
eel_after_check ();
|
||||
}
|
||||
|
||||
void
|
||||
eel_check_integer_result (long result,
|
||||
long expected)
|
||||
{
|
||||
if (result != expected)
|
||||
{
|
||||
eel_report_check_failure (g_strdup_printf ("%ld", result),
|
||||
g_strdup_printf ("%ld", expected));
|
||||
}
|
||||
eel_after_check ();
|
||||
}
|
||||
|
||||
void
|
||||
eel_check_string_result (char *result,
|
||||
const char *expected)
|
||||
{
|
||||
gboolean match;
|
||||
|
||||
/* Stricter than eel_strcmp.
|
||||
* NULL does not match "" in this test.
|
||||
*/
|
||||
if (expected == NULL)
|
||||
{
|
||||
match = result == NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
match = result != NULL && strcmp (result, expected) == 0;
|
||||
}
|
||||
|
||||
if (!match)
|
||||
{
|
||||
eel_report_check_failure (result, g_strdup (expected));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_free (result);
|
||||
}
|
||||
eel_after_check ();
|
||||
}
|
||||
|
||||
void
|
||||
eel_before_check_function (const char *name)
|
||||
{
|
||||
fprintf (stderr, "running %s\n", name);
|
||||
}
|
||||
|
||||
void
|
||||
eel_after_check_function (void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* ! EEL_OMIT_SELF_CHECK */
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
eel-self-checks.h: The self-check framework.
|
||||
|
||||
Copyright (C) 1999 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Darin Adler <darin@eazel.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#define EEL_CHECK_RESULT(type, expression, expected_value) \
|
||||
G_STMT_START { \
|
||||
eel_before_check (#expression, __FILE__, __LINE__); \
|
||||
eel_check_##type##_result (expression, expected_value); \
|
||||
} G_STMT_END
|
||||
|
||||
#define EEL_CHECK_BOOLEAN_RESULT(expression, expected_value) \
|
||||
EEL_CHECK_RESULT(boolean, expression, expected_value)
|
||||
#define EEL_CHECK_INTEGER_RESULT(expression, expected_value) \
|
||||
EEL_CHECK_RESULT(integer, expression, expected_value)
|
||||
#define EEL_CHECK_STRING_RESULT(expression, expected_value) \
|
||||
EEL_CHECK_RESULT(string, expression, expected_value)
|
||||
|
||||
void eel_exit_if_self_checks_failed (void);
|
||||
void eel_before_check_function (const char *name);
|
||||
void eel_after_check_function (void);
|
||||
void eel_before_check (const char *expression,
|
||||
const char *file_name,
|
||||
int line_number);
|
||||
void eel_after_check (void);
|
||||
|
||||
/* Both 'result' and 'expected' get freed with g_free */
|
||||
void eel_report_check_failure (char *result,
|
||||
char *expected);
|
||||
void eel_check_boolean_result (gboolean result,
|
||||
gboolean expected_value);
|
||||
void eel_check_integer_result (long result,
|
||||
long expected_value);
|
||||
void eel_check_string_result (char *result,
|
||||
const char *expected_value);
|
||||
|
||||
#define EEL_SELF_CHECK_FUNCTION_PROTOTYPE(function) \
|
||||
void function (void);
|
||||
|
||||
#define EEL_CALL_SELF_CHECK_FUNCTION(function) \
|
||||
eel_before_check_function (#function); \
|
||||
function (); \
|
||||
eel_after_check_function ();
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
* eel-string.c: String routines to augment <string.h>.
|
||||
*
|
||||
* Copyright (C) 2000 Eazel, Inc.
|
||||
*
|
||||
* The Gnome Library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* The Gnome Library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with the Gnome Library; see the file COPYING.LIB. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Darin Adler <darin@eazel.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if !defined (EEL_OMIT_SELF_CHECK)
|
||||
#include "eel-lib-self-check-functions.h"
|
||||
#endif
|
||||
|
||||
#if !defined (EEL_OMIT_SELF_CHECK)
|
||||
|
||||
void
|
||||
eel_self_check_string (void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !EEL_OMIT_SELF_CHECK */
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include <config.h>
|
||||
#include "eel-vfs-extensions.h"
|
||||
#include "eel-lib-self-check-functions.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
libeel_2_sources = [
|
||||
'eel-debug.h',
|
||||
'eel-debug.c',
|
||||
'eel-self-checks.h',
|
||||
'eel-self-checks.c',
|
||||
'eel-stock-dialogs.h',
|
||||
'eel-stock-dialogs.c',
|
||||
'eel-string.c',
|
||||
'eel-vfs-extensions.h',
|
||||
'eel-vfs-extensions.c',
|
||||
'eel-lib-self-check-functions.h',
|
||||
'eel-lib-self-check-functions.c',
|
||||
]
|
||||
|
||||
libeel_2_deps = [
|
||||
|
@ -32,16 +27,3 @@ eel_2 = declare_dependency(
|
|||
include_directories: nautilus_include_dirs,
|
||||
dependencies: libeel_2_deps
|
||||
)
|
||||
|
||||
check_eel = executable(
|
||||
'check-eel',
|
||||
'check-program.c',
|
||||
dependencies: [
|
||||
eel_2,
|
||||
xml
|
||||
]
|
||||
)
|
||||
|
||||
if get_option('tests') == 'all'
|
||||
test('check-eel', check_eel)
|
||||
endif
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
G_DEBUG=fatal-warnings ./nautilus --check
|
|
@ -122,8 +122,6 @@ libnautilus_sources = [
|
|||
'nautilus-query-editor.h',
|
||||
'nautilus-scheme.h',
|
||||
'nautilus-search-popover.c',
|
||||
'nautilus-self-check-functions.c',
|
||||
'nautilus-self-check-functions.h',
|
||||
'nautilus-shell-search-provider.c',
|
||||
'nautilus-star-cell.c',
|
||||
'nautilus-star-cell.h',
|
||||
|
@ -199,8 +197,6 @@ libnautilus_sources = [
|
|||
'nautilus-icon-names.h',
|
||||
'nautilus-keyfile-metadata.c',
|
||||
'nautilus-keyfile-metadata.h',
|
||||
'nautilus-lib-self-check-functions.c',
|
||||
'nautilus-lib-self-check-functions.h',
|
||||
'nautilus-metadata.h',
|
||||
'nautilus-metadata.c',
|
||||
'nautilus-module.c',
|
||||
|
@ -310,20 +306,6 @@ nautilus = executable(
|
|||
install: true
|
||||
)
|
||||
|
||||
if get_option('tests') == 'all'
|
||||
test(
|
||||
'nautilus', nautilus,
|
||||
args: [
|
||||
'--check',
|
||||
],
|
||||
env: [
|
||||
'G_DEBUG=fatal-warnings',
|
||||
'GSETTINGS_SCHEMA_DIR=@0@'.format(join_paths(meson.project_build_root(), 'data')),
|
||||
'RUNNING_TESTS=@0@'.format('TRUE')
|
||||
]
|
||||
)
|
||||
endif
|
||||
|
||||
nautilus_autorun_software_sources = [
|
||||
'nautilus-autorun-software.c',
|
||||
'nautilus-icon-info.c',
|
||||
|
|
|
@ -53,13 +53,11 @@
|
|||
#include "nautilus-freedesktop-dbus.h"
|
||||
#include "nautilus-global-preferences.h"
|
||||
#include "nautilus-icon-info.h"
|
||||
#include "nautilus-lib-self-check-functions.h"
|
||||
#include "nautilus-module.h"
|
||||
#include "nautilus-preferences-window.h"
|
||||
#include "nautilus-previewer.h"
|
||||
#include "nautilus-progress-persistence-handler.h"
|
||||
#include "nautilus-scheme.h"
|
||||
#include "nautilus-self-check-functions.h"
|
||||
#include "nautilus-shell-search-provider.h"
|
||||
#include "nautilus-signaller.h"
|
||||
#include "nautilus-tag-manager.h"
|
||||
|
@ -498,7 +496,7 @@ nautilus_application_open_location (NautilusApplication *self,
|
|||
|
||||
/* Note: when launched from command line we do not reach this method
|
||||
* since we manually handle the command line parameters in order to
|
||||
* parse --version, --check, etc.
|
||||
* parse --version, etc.
|
||||
* However this method is called when open () is called via dbus, for
|
||||
* instance when gtk_uri_open () is called from outside.
|
||||
*/
|
||||
|
@ -569,15 +567,6 @@ do_cmdline_sanity_checks (NautilusApplication *self,
|
|||
{
|
||||
gboolean retval = FALSE;
|
||||
|
||||
if (g_variant_dict_contains (options, "check") &&
|
||||
(g_variant_dict_contains (options, G_OPTION_REMAINING) ||
|
||||
g_variant_dict_contains (options, "quit")))
|
||||
{
|
||||
g_printerr ("%s\n",
|
||||
_("--check cannot be used with other options."));
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (g_variant_dict_contains (options, "quit") &&
|
||||
g_variant_dict_contains (options, G_OPTION_REMAINING))
|
||||
{
|
||||
|
@ -601,26 +590,6 @@ out:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static int
|
||||
do_perform_self_checks (void)
|
||||
{
|
||||
#ifndef NAUTILUS_OMIT_SELF_CHECK
|
||||
gtk_init ();
|
||||
|
||||
/* Run the checks (each twice) for nautilus and libnautilus-private. */
|
||||
|
||||
nautilus_run_self_checks ();
|
||||
nautilus_run_lib_self_checks ();
|
||||
eel_exit_if_self_checks_failed ();
|
||||
|
||||
nautilus_run_self_checks ();
|
||||
nautilus_run_lib_self_checks ();
|
||||
eel_exit_if_self_checks_failed ();
|
||||
#endif
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_application_select (NautilusApplication *self,
|
||||
GFile **files,
|
||||
|
@ -930,12 +899,6 @@ nautilus_application_command_line (GApplication *application,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (g_variant_dict_contains (options, "check"))
|
||||
{
|
||||
retval = do_perform_self_checks ();
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (g_variant_dict_contains (options, "quit"))
|
||||
{
|
||||
DEBUG ("Killing app, as requested");
|
||||
|
@ -955,10 +918,6 @@ nautilus_application_init (NautilusApplication *self)
|
|||
{
|
||||
static const GOptionEntry options[] =
|
||||
{
|
||||
#ifndef NAUTILUS_OMIT_SELF_CHECK
|
||||
{ "check", 'c', 0, G_OPTION_ARG_NONE, NULL,
|
||||
N_("Perform a quick set of self-check tests."), NULL },
|
||||
#endif
|
||||
{ "version", '\0', 0, G_OPTION_ARG_NONE, NULL,
|
||||
N_("Show the version of the program."), NULL },
|
||||
{ "new-window", 'w', 0, G_OPTION_ARG_NONE, NULL,
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "nautilus-file-queue.h"
|
||||
#include "nautilus-file-utilities.h"
|
||||
#include "nautilus-global-preferences.h"
|
||||
#include "nautilus-lib-self-check-functions.h"
|
||||
#include "nautilus-metadata.h"
|
||||
#include "nautilus-scheme.h"
|
||||
#include "nautilus-search-directory-file.h"
|
||||
|
@ -1957,12 +1956,3 @@ nautilus_directory_dump (NautilusDirectory *directory)
|
|||
g_print ("uri: %s\n", uri);
|
||||
g_print ("ref count: %d\n", G_OBJECT (directory)->ref_count);
|
||||
}
|
||||
|
||||
|
||||
#if !defined (NAUTILUS_OMIT_SELF_CHECK)
|
||||
void
|
||||
nautilus_self_check_directory (void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !NAUTILUS_OMIT_SELF_CHECK */
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "nautilus-file-operations.h"
|
||||
|
||||
#include "nautilus-file-changes-queue.h"
|
||||
#include "nautilus-lib-self-check-functions.h"
|
||||
|
||||
#include "nautilus-progress-info.h"
|
||||
|
||||
|
@ -8771,12 +8770,3 @@ nautilus_file_operations_compress (GList *files,
|
|||
g_task_set_task_data (task, compress_job, NULL);
|
||||
g_task_run_in_thread (task, compress_task_thread_func);
|
||||
}
|
||||
|
||||
#if !defined (NAUTILUS_OMIT_SELF_CHECK)
|
||||
|
||||
void
|
||||
nautilus_self_check_file_operations (void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "nautilus-filename-utilities.h"
|
||||
#include "nautilus-global-preferences.h"
|
||||
#include "nautilus-icon-names.h"
|
||||
#include "nautilus-lib-self-check-functions.h"
|
||||
#include "nautilus-metadata.h"
|
||||
#include "nautilus-file.h"
|
||||
#include "nautilus-file-operations.h"
|
||||
|
@ -1315,15 +1314,6 @@ nautilus_get_max_child_name_length_for_location (GFile *location)
|
|||
return max_child_name_length;
|
||||
}
|
||||
|
||||
#if !defined (NAUTILUS_OMIT_SELF_CHECK)
|
||||
|
||||
void
|
||||
nautilus_self_check_file_utilities (void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !NAUTILUS_OMIT_SELF_CHECK */
|
||||
|
||||
void
|
||||
nautilus_ensure_extension_builtins (void)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include "nautilus-filename-utilities.h"
|
||||
#include "nautilus-global-preferences.h"
|
||||
#include "nautilus-icon-info.h"
|
||||
#include "nautilus-lib-self-check-functions.h"
|
||||
#include "nautilus-metadata.h"
|
||||
#include "nautilus-module.h"
|
||||
#include "nautilus-scheme.h"
|
||||
|
@ -9454,12 +9453,3 @@ nautilus_file_info_iface_init (NautilusFileInfoInterface *iface)
|
|||
iface->get_mount = get_mount;
|
||||
iface->can_write = can_write;
|
||||
}
|
||||
|
||||
#if !defined (NAUTILUS_OMIT_SELF_CHECK)
|
||||
|
||||
void
|
||||
nautilus_self_check_file (void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* !NAUTILUS_OMIT_SELF_CHECK */
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
* nautilus-lib-self-check-functions.c: Wrapper for all self check functions
|
||||
* in Nautilus proper.
|
||||
*
|
||||
* Copyright (C) 2000 Eazel, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Darin Adler <darin@bentspoon.com>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if !defined (NAUTILUS_OMIT_SELF_CHECK)
|
||||
|
||||
#include "nautilus-lib-self-check-functions.h"
|
||||
|
||||
void
|
||||
nautilus_run_lib_self_checks (void)
|
||||
{
|
||||
NAUTILUS_LIB_FOR_EACH_SELF_CHECK_FUNCTION (EEL_CALL_SELF_CHECK_FUNCTION)
|
||||
}
|
||||
|
||||
#endif /* ! NAUTILUS_OMIT_SELF_CHECK */
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
nautilus-lib-self-check-functions.h: Wrapper and prototypes for all
|
||||
self-check functions in libnautilus.
|
||||
|
||||
Copyright (C) 2000 Eazel, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Author: Darin Adler <darin@bentspoon.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <eel/eel-self-checks.h>
|
||||
|
||||
void nautilus_run_lib_self_checks (void);
|
||||
|
||||
/* Putting the prototypes for these self-check functions in each
|
||||
header file for the files they are defined in would make compiling
|
||||
the self-check framework take way too long (since one file would
|
||||
have to include everything).
|
||||
|
||||
So we put the list of functions here instead.
|
||||
|
||||
Instead of just putting prototypes here, we put this macro that
|
||||
can be used to do operations on the whole list of functions.
|
||||
*/
|
||||
|
||||
#define NAUTILUS_LIB_FOR_EACH_SELF_CHECK_FUNCTION(macro) \
|
||||
macro (nautilus_self_check_file_utilities) \
|
||||
macro (nautilus_self_check_file_operations) \
|
||||
macro (nautilus_self_check_directory) \
|
||||
macro (nautilus_self_check_file) \
|
||||
/* Add new self-check functions to the list above this line. */
|
||||
|
||||
/* Generate prototypes for all the functions. */
|
||||
NAUTILUS_LIB_FOR_EACH_SELF_CHECK_FUNCTION (EEL_SELF_CHECK_FUNCTION_PROTOTYPE)
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Nautilus
|
||||
*
|
||||
* Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
*
|
||||
* Nautilus is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* Nautilus is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Darin Adler <darin@bentspoon.com>
|
||||
*/
|
||||
|
||||
/* nautilus-self-check-functions.c: Wrapper for all self check functions
|
||||
* in Nautilus proper.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if !defined (NAUTILUS_OMIT_SELF_CHECK)
|
||||
|
||||
#include "nautilus-self-check-functions.h"
|
||||
|
||||
void nautilus_run_self_checks(void)
|
||||
{
|
||||
NAUTILUS_FOR_EACH_SELF_CHECK_FUNCTION (NAUTILUS_CALL_SELF_CHECK_FUNCTION)
|
||||
}
|
||||
|
||||
#endif /* ! NAUTILUS_OMIT_SELF_CHECK */
|
|
@ -1,46 +0,0 @@
|
|||
|
||||
/*
|
||||
* Nautilus
|
||||
*
|
||||
* Copyright (C) 1999, 2000 Eazel, Inc.
|
||||
*
|
||||
* Nautilus is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* Nautilus is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Darin Adler <darin@bentspoon.com>
|
||||
*/
|
||||
|
||||
/* nautilus-self-check-functions.h: Wrapper and prototypes for all self
|
||||
* check functions in Nautilus proper.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
void nautilus_run_self_checks (void);
|
||||
|
||||
/* Putting the prototypes for these self-check functions in each
|
||||
header file for the files they are defined in would make compiling
|
||||
the self-check framework take way too long (since one file would
|
||||
have to include everything).
|
||||
|
||||
So we put the list of functions here instead.
|
||||
|
||||
Instead of just putting prototypes here, we put this macro that
|
||||
can be used to do operations on the whole list of functions.
|
||||
*/
|
||||
|
||||
#define NAUTILUS_FOR_EACH_SELF_CHECK_FUNCTION(macro) \
|
||||
/* Add new self-check functions to the list above this line. */
|
||||
|
||||
/* Generate prototypes for all the functions. */
|
||||
NAUTILUS_FOR_EACH_SELF_CHECK_FUNCTION (NAUTILUS_SELF_CHECK_FUNCTION_PROTOTYPE)
|
Loading…
Reference in a new issue