Merge lp:~jeremywootten/pantheon-files/enable-testing-ctest-part2 into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Cody Garver
Approved revision: 2444
Merged at revision: 2482
Proposed branch: lp:~jeremywootten/pantheon-files/enable-testing-ctest-part2
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 1159 lines (+593/-440)
23 files modified
libcore/CMakeLists.txt (+2/-36)
libcore/tests/CMakeLists.txt (+4/-0)
libcore/tests/GOFDirectoryAsyncTests/CMakeLists.txt (+32/-0)
libcore/tests/GOFDirectoryAsyncTests/marlincore-tests-file.c (+100/-0)
libcore/tests/GOFDirectoryAsyncTests/marlincore-tests-file.h (+27/-0)
libcore/tests/GOFDirectoryAsyncTests/tests.c (+33/-0)
libcore/tests/GOFFileTests/CMakeLists.txt (+32/-0)
libcore/tests/GOFFileTests/marlincore-tests-gof.c (+99/-0)
libcore/tests/GOFFileTests/marlincore-tests-gof.h (+27/-0)
libcore/tests/GOFFileTests/tests.c (+33/-0)
libcore/tests/Makefile.am (+0/-20)
libcore/tests/MarlinIconInfoTests/CMakeLists.txt (+32/-0)
libcore/tests/MarlinIconInfoTests/marlincore-tests-icon-info.c (+65/-0)
libcore/tests/MarlinIconInfoTests/marlincore-tests-icon-info.h (+28/-0)
libcore/tests/MarlinIconInfoTests/tests.c (+34/-0)
libcore/tests/UtilTests/CMakeLists.txt (+45/-0)
libcore/tests/marlincore-tests-file.c (+0/-100)
libcore/tests/marlincore-tests-file.h (+0/-27)
libcore/tests/marlincore-tests-gof.c (+0/-99)
libcore/tests/marlincore-tests-gof.h (+0/-27)
libcore/tests/marlincore-tests-icon-info.c (+0/-65)
libcore/tests/marlincore-tests-icon-info.h (+0/-28)
libcore/tests/tests.c (+0/-38)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/enable-testing-ctest-part2
Reviewer Review Type Date Requested Status
Cody Garver (community) Needs Information
Review via email: mp+314455@code.launchpad.net

Commit message

Restructure unit tests subdirectories

Description of the change

Reorganise /libcore/tests folder structure.

To post a comment you must log in.
2440. By Jeremy Wootten

Merge updates from parent and resolve conflicts

2441. By Jeremy Wootten

Merge changes from parent (add default icon theme method)

2442. By Jeremy Wootten

Merge trunk to r2470

Revision history for this message
Cody Garver (codygarver) wrote :

I'm concerned that `enable_testing ()` appears 6 times in this diff, are you certain it's needed more than once?

review: Needs Information
2443. By Jeremy Wootten

Remove superfluous enable_testing() lines

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Cody: You are right - enable_testing () covers subdirectories so is only needed in the root directory, it seems.

Revision history for this message
Cody Garver (codygarver) wrote :

Great. After resolving conflicts, this branch is ready to merge.

2444. By Jeremy Wootten

Merge trunk to r2481

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

I didn't get any conflicts when I merged the trunk, but there was a warning of a criss-cross. I tried push --overwrite this time.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libcore/CMakeLists.txt'
--- libcore/CMakeLists.txt 2017-02-01 14:51:38 +0000
+++ libcore/CMakeLists.txt 2017-02-08 11:12:03 +0000
@@ -1,5 +1,3 @@
1include (Tests)
2
3set (PKGNAME pantheon-files-core)1set (PKGNAME pantheon-files-core)
4set (PKGNAME_ PANTHEON_FILES_CORE)2set (PKGNAME_ PANTHEON_FILES_CORE)
5set (${PKGNAME_}_VERSION 0.1)3set (${PKGNAME_}_VERSION 0.1)
@@ -147,37 +145,5 @@
147145
148install (TARGETS ${PKGNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})146install (TARGETS ${PKGNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
149147
150add_executable (pantheon-files-core_tests148add_subdirectory (tests)
151 tests/tests.c149
152 tests/marlincore-tests-gof.c
153 tests/marlincore-tests-file.c
154 tests/marlincore-tests-icon-info.c)
155
156add_test (core pantheon-files-core_tests)
157
158target_link_libraries (pantheon-files-core_tests pantheon-files-core ${DEPS_LIBRARIES})
159add_dependencies (pantheon-files-core_tests pantheon-files-core)
160
161vala_precompile (VALA_TEST_C ${PKGNAME}-vala_tests
162 tests/Tests.vala
163 PACKAGES
164 granite
165 gtk+-3.0
166 gio-2.0
167 gee-0.8
168 gmodule-2.0
169 libcanberra
170 pantheon-files-core
171 OPTIONS
172 --thread
173 --target-glib=2.32 # Needed for new thread API
174)
175
176add_executable (${PKGNAME}-vala_tests
177 ${VALA_TEST_C}
178)
179
180target_link_libraries (${PKGNAME}-vala_tests pantheon-files-core ${DEPS_LIBRARIES})
181add_dependencies (${PKGNAME}-vala_tests pantheon-files-core)
182
183add_test (core-vala-tests ${PKGNAME}-vala_tests)
184150
=== added file 'libcore/tests/CMakeLists.txt'
--- libcore/tests/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ libcore/tests/CMakeLists.txt 2017-02-08 11:12:03 +0000
@@ -0,0 +1,4 @@
1add_subdirectory (UtilTests)
2add_subdirectory (MarlinIconInfoTests)
3add_subdirectory (GOFFileTests)
4add_subdirectory (GOFDirectoryAsyncTests)
05
=== added directory 'libcore/tests/GOFDirectoryAsyncTests'
=== added file 'libcore/tests/GOFDirectoryAsyncTests/CMakeLists.txt'
--- libcore/tests/GOFDirectoryAsyncTests/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ libcore/tests/GOFDirectoryAsyncTests/CMakeLists.txt 2017-02-08 11:12:03 +0000
@@ -0,0 +1,32 @@
1include_directories(${CMAKE_BINARY_DIR})
2include_directories(${CMAKE_CURRENT_SOURCE_DIR})
3
4set (CORE_LIB
5 pantheon-files-core
6)
7
8set (CFLAGS
9 ${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER}
10)
11
12set (LIB_PATHS
13 ${DEPS_LIBRARY_DIRS}
14)
15
16set (TEST_NAME
17 gof-directory-async_tests
18)
19
20link_directories (${LIB_PATHS})
21add_definitions (${CFLAGS} -O2)
22
23
24add_executable (${TEST_NAME}
25 tests.c
26 marlincore-tests-file.c
27)
28
29target_link_libraries (${TEST_NAME} ${CORE_LIB} ${DEPS_LIBRARIES})
30add_dependencies (${TEST_NAME} ${CORE_LIB})
31
32add_test (core-${TEST_NAME} ${TEST_NAME})
033
=== added file 'libcore/tests/GOFDirectoryAsyncTests/marlincore-tests-file.c'
--- libcore/tests/GOFDirectoryAsyncTests/marlincore-tests-file.c 1970-01-01 00:00:00 +0000
+++ libcore/tests/GOFDirectoryAsyncTests/marlincore-tests-file.c 2017-02-08 11:12:03 +0000
@@ -0,0 +1,100 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <stdlib.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include <gio/gio.h>
24#include "marlincore-tests-file.h"
25#include "pantheon-files-core.h"
26#include "gof-file.h"
27
28GMainLoop* loop;
29
30static gboolean fatal_handler(const gchar* log_domain,
31 GLogLevelFlags log_level,
32 const gchar* message,
33 gpointer user_data)
34{
35 return FALSE;
36}
37
38static void second_load_done(GOFDirectoryAsync* dir, gpointer data)
39{
40 g_message ("%s", G_STRFUNC);
41 g_assert_cmpint(dir->file->exists, ==, TRUE);
42
43 GOFDirectoryAsync *dir2 = gof_directory_async_from_file(dir->file);
44 g_assert_cmpint(dir->files_count, ==, dir2->files_count);
45 g_message ("files_count %u", dir->files_count);
46 g_object_unref (dir2);
47
48 /* some files testing inside a cached directory */
49 GOFFile *f1 = gof_file_get_by_uri ("file:///tmp/marlin-test/a");
50 g_object_unref (f1);
51
52 GOFFile *f2 = gof_file_get_by_uri ("file:///tmp/marlin-test/a");
53 g_object_unref (f2);
54
55 /* use a marlin function would show a dialog, FIXME */
56 system("rm -rf /tmp/marlin-test");
57 /* free previously allocated dir */
58 g_object_unref (dir);
59
60 g_main_loop_quit(loop);
61
62}
63
64static void first_load_done(GOFDirectoryAsync* dir, gpointer data)
65{
66 g_message ("%s", G_STRFUNC);
67 g_assert_cmpint(dir->file->exists, ==, FALSE);
68
69 system("mkdir /tmp/marlin-test");
70 system("touch /tmp/marlin-test/a");
71 system("touch /tmp/marlin-test/b");
72 system("touch /tmp/marlin-test/c");
73 system("touch /tmp/marlin-test/d");
74
75 /* we use cached directories so better block this callback */
76 g_signal_handlers_block_by_func (dir, first_load_done, NULL);
77
78 GOFDirectoryAsync *dir2;
79 dir2 = gof_directory_async_from_file(dir->file);
80 g_signal_connect(dir2, "done_loading", (GCallback) second_load_done, NULL);
81 gof_directory_async_init(dir2, NULL, NULL);
82
83 /* free previously allocated dir */
84 g_object_unref (dir);
85}
86
87void marlincore_tests_file(void)
88{
89 GOFDirectoryAsync* dir;
90
91 g_test_log_set_fatal_handler(fatal_handler, NULL);
92 system("rm -rf /tmp/marlin-test");
93
94 dir = gof_directory_async_from_gfile(g_file_new_for_path("/tmp/marlin-test"));
95 g_signal_connect(dir, "done_loading", (GCallback) first_load_done, NULL);
96 gof_directory_async_init(dir, NULL, NULL);
97
98 loop = g_main_loop_new(NULL, FALSE);
99 g_main_loop_run(loop);
100}
0101
=== added file 'libcore/tests/GOFDirectoryAsyncTests/marlincore-tests-file.h'
--- libcore/tests/GOFDirectoryAsyncTests/marlincore-tests-file.h 1970-01-01 00:00:00 +0000
+++ libcore/tests/GOFDirectoryAsyncTests/marlincore-tests-file.h 2017-02-08 11:12:03 +0000
@@ -0,0 +1,27 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#ifndef _H_MARLIN_CORE_TESTS_FILE
21#define _H_MARLIN_CORE_TESTS_FILE
22
23#include "gof-file.h"
24
25void marlincore_tests_file(void);
26
27#endif
028
=== added file 'libcore/tests/GOFDirectoryAsyncTests/tests.c'
--- libcore/tests/GOFDirectoryAsyncTests/tests.c 1970-01-01 00:00:00 +0000
+++ libcore/tests/GOFDirectoryAsyncTests/tests.c 2017-02-08 11:12:03 +0000
@@ -0,0 +1,33 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <gio/gio.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include "marlincore-tests-file.h"
24#include "pantheon-files-core.h"
25
26int main (int argc, char* argv[])
27{
28 g_test_init (&argc, &argv, NULL);
29
30 g_test_add_func("/marlin/file", marlincore_tests_file);
31
32 return g_test_run();
33}
034
=== added directory 'libcore/tests/GOFFileTests'
=== added file 'libcore/tests/GOFFileTests/CMakeLists.txt'
--- libcore/tests/GOFFileTests/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ libcore/tests/GOFFileTests/CMakeLists.txt 2017-02-08 11:12:03 +0000
@@ -0,0 +1,32 @@
1include_directories(${CMAKE_BINARY_DIR})
2include_directories(${CMAKE_CURRENT_SOURCE_DIR})
3
4set (CORE_LIB
5 pantheon-files-core
6)
7
8set (CFLAGS
9 ${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER}
10)
11
12set (LIB_PATHS
13 ${DEPS_LIBRARY_DIRS}
14)
15
16set (TEST_NAME
17 gof-file_tests
18)
19
20link_directories (${LIB_PATHS})
21add_definitions (${CFLAGS} -O2)
22
23
24add_executable (${TEST_NAME}
25 tests.c
26 marlincore-tests-gof.c
27)
28
29target_link_libraries (${TEST_NAME} ${CORE_LIB} ${DEPS_LIBRARIES})
30add_dependencies (${TEST_NAME} ${CORE_LIB})
31
32add_test (core-${TEST_NAME} ${TEST_NAME})
033
=== added file 'libcore/tests/GOFFileTests/marlincore-tests-gof.c'
--- libcore/tests/GOFFileTests/marlincore-tests-gof.c 1970-01-01 00:00:00 +0000
+++ libcore/tests/GOFFileTests/marlincore-tests-gof.c 2017-02-08 11:12:03 +0000
@@ -0,0 +1,99 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <stdlib.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include <gio/gio.h>
24#include "marlincore-tests-gof.h"
25
26
27static gboolean fatal_handler(const gchar* log_domain,
28 GLogLevelFlags log_level,
29 const gchar* message,
30 gpointer user_data)
31{
32 return FALSE;
33}
34
35
36void marlincore_tests_goffile(void)
37{
38 GOFFile* file;
39
40 g_test_log_set_fatal_handler(fatal_handler, NULL);
41 /* The URI is valid, the target exists */
42 file = gof_file_get_by_uri("file:///usr/share");
43 g_assert(file != NULL);
44 gof_file_query_update (file);
45 g_assert(file != NULL);
46 g_assert(file->info != NULL);
47 g_assert_cmpstr(g_file_info_get_name (file->info), ==, "share");
48 g_assert_cmpstr(g_file_info_get_display_name (file->info), ==, "share");
49 g_assert_cmpstr(file->basename, ==, "share");
50 g_assert_cmpint(file->is_directory, ==, TRUE);
51 g_assert_cmpint(file->is_hidden, ==, FALSE);
52 g_assert_cmpstr(gof_file_get_ftype (file), ==, "inode/directory");
53 g_assert_cmpint(gof_file_is_symlink(file), ==, FALSE);
54 /* TODO: formated_type needs a test too, but there are some issues with
55 * translations. */
56 g_assert_cmpstr(g_file_get_uri(file->location), ==, "file:///usr/share");
57 g_assert_cmpstr(gof_file_get_uri(file), ==, "file:///usr/share");
58
59 /* some allocations tests */
60 int i;
61 for (i=0; i<5; i++) {
62 GFile *location = g_file_new_for_path ("/usr/share");
63 file = gof_file_get(location);
64 g_object_unref (location);
65 }
66 for (i=0; i<5; i++)
67 g_object_unref (file);
68 /* we got to remove the file from the cache other the next cache lookup */
69 gof_file_remove_from_caches (file);
70 g_object_unref (file);
71 file = gof_file_get_by_uri("file:///usr/share");
72 g_object_unref (file);
73
74
75 /* The URI is valid, the target doesn't exist */
76 g_test_log_set_fatal_handler(fatal_handler, NULL);
77 file = gof_file_get_by_uri("file:///tmp/very/long/path/azerty");
78 g_assert(file != NULL);
79
80 system("rm /tmp/.marlin_backup /tmp/marlin_sym -f && touch /tmp/.marlin_backup");
81 /* The URI is valid, the target exists */
82 file = gof_file_get_by_uri("file:///tmp/.marlin_backup");
83 gof_file_query_update (file);
84 g_assert(file != NULL);
85 g_assert_cmpint(file->is_directory, ==, FALSE);
86 g_assert_cmpint(file->is_hidden, ==, TRUE); /* it's a backup, so, it's hidden */
87 g_assert_cmpint(file->size, ==, 0); /* the file is empty since we just create it it */
88
89 system("ln -s /tmp/marlin_backup~ /tmp/marlin_sym ");
90
91 /* a symlink */
92 file = gof_file_get_by_uri("file:///tmp/marlin_sym");
93 gof_file_query_update (file);
94 g_assert(file != NULL);
95 g_assert_cmpstr(gof_file_get_symlink_target(file), ==, "/tmp/marlin_backup~");
96 g_assert_cmpint(gof_file_is_symlink(file), ==, TRUE);
97 g_assert_cmpint(file->is_directory, ==, FALSE);
98 g_assert_cmpint(file->is_hidden, ==, FALSE);
99}
0100
=== added file 'libcore/tests/GOFFileTests/marlincore-tests-gof.h'
--- libcore/tests/GOFFileTests/marlincore-tests-gof.h 1970-01-01 00:00:00 +0000
+++ libcore/tests/GOFFileTests/marlincore-tests-gof.h 2017-02-08 11:12:03 +0000
@@ -0,0 +1,27 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#ifndef _H_MARLIN_CORE_TESTS_GOF
21#define _H_MARLIN_CORE_TESTS_GOF
22
23#include "gof-file.h"
24
25void marlincore_tests_goffile(void);
26
27#endif
028
=== added file 'libcore/tests/GOFFileTests/tests.c'
--- libcore/tests/GOFFileTests/tests.c 1970-01-01 00:00:00 +0000
+++ libcore/tests/GOFFileTests/tests.c 2017-02-08 11:12:03 +0000
@@ -0,0 +1,33 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <gio/gio.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include "marlincore-tests-gof.h"
24#include "pantheon-files-core.h"
25
26int main (int argc, char* argv[])
27{
28 g_test_init (&argc, &argv, NULL);
29
30 g_test_add_func("/marlin/goffile", marlincore_tests_goffile);
31
32 return g_test_run();
33}
034
=== removed file 'libcore/tests/Makefile.am'
--- libcore/tests/Makefile.am 2013-08-10 20:20:23 +0000
+++ libcore/tests/Makefile.am 1970-01-01 00:00:00 +0000
@@ -1,20 +0,0 @@
1# GLIB - Library of useful C routines
2
3#GTESTER = gtester # for non-GLIB packages
4GTESTER = /usr/bin/gtester # for the GLIB package
5GTESTER_REPORT = /usr/bin/gtester-report # for the GLIB package
6
7check_PROGRAMS = coremarlin_tests
8coremarlin_tests_SOURCES = tests.c \
9 marlincore-tests-gof.c \
10 marlincore-tests-file.c
11
12coremarlin_tests_LDADD = \
13 $(top_srcdir)/libcore/libmarlincore.la \
14 $(top_srcdir)/libwidgets/libmarlinwidgets.la \
15 $(CORE_LIBS) \
16 $(NULL)
17coremarlin_tests_CFLAGS = $(CORE_CFLAGS) -I.. -I$(top_srcdir)/libcore
18TESTS_ENVIRONMENT= $(GTESTER)
19TESTS = coremarlin_tests
20
210
=== added directory 'libcore/tests/MarlinIconInfoTests'
=== added file 'libcore/tests/MarlinIconInfoTests/CMakeLists.txt'
--- libcore/tests/MarlinIconInfoTests/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ libcore/tests/MarlinIconInfoTests/CMakeLists.txt 2017-02-08 11:12:03 +0000
@@ -0,0 +1,32 @@
1include_directories(${CMAKE_BINARY_DIR})
2include_directories(${CMAKE_CURRENT_SOURCE_DIR})
3
4set (CORE_LIB
5 pantheon-files-core
6)
7
8set (CFLAGS
9 ${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER}
10)
11
12set (LIB_PATHS
13 ${DEPS_LIBRARY_DIRS}
14)
15
16set (TEST_NAME
17 marlin-icon-info_tests
18)
19
20link_directories (${LIB_PATHS})
21add_definitions (${CFLAGS} -O2)
22
23
24add_executable (${TEST_NAME}
25 tests.c
26 marlincore-tests-icon-info.c
27)
28
29target_link_libraries (${TEST_NAME} ${CORE_LIB} ${DEPS_LIBRARIES})
30add_dependencies (${TEST_NAME} ${CORE_LIB})
31
32add_test (core-${TEST_NAME} ${TEST_NAME})
033
=== added file 'libcore/tests/MarlinIconInfoTests/marlincore-tests-icon-info.c'
--- libcore/tests/MarlinIconInfoTests/marlincore-tests-icon-info.c 1970-01-01 00:00:00 +0000
+++ libcore/tests/MarlinIconInfoTests/marlincore-tests-icon-info.c 2017-02-08 11:12:03 +0000
@@ -0,0 +1,65 @@
1/*
2 * Copyright (C) 2012, ammonkey <am.monkeyd@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <stdlib.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include <gio/gio.h>
24#include "marlincore-tests-icon-info.h"
25
26GMainLoop* loop;
27
28static gboolean fatal_handler(const gchar* log_domain,
29 GLogLevelFlags log_level,
30 const gchar* message,
31 gpointer user_data)
32{
33 return FALSE;
34}
35
36static gboolean
37show_infos (gpointer data)
38{
39 marlin_icon_info_infos_caches ();
40 g_main_loop_quit (loop);
41
42 return FALSE;
43}
44
45void marlincore_tests_icon_info (void)
46{
47 GOFFile* file;
48 g_test_log_set_fatal_handler (fatal_handler, NULL);
49 /* The URI is valid, the target exists */
50 file = gof_file_get_by_uri ("file:///usr/share/icons/hicolor/16x16/apps/system-file-manager.svg");
51 g_assert(file != NULL);
52 gof_file_query_update (file);
53 g_assert(file->pix == NULL);
54 file->flags = 2;
55 gof_file_update_icon (file, 128);
56 g_assert(file->pix != NULL);
57 gof_file_update_icon (file, 32);
58 /*gof_file_update_icon (file, 16);*/
59 g_message ("pix ref count %u", G_OBJECT (file->pix)->ref_count);
60 g_object_unref (file->pix);
61 g_timeout_add_seconds_full (0, 2, show_infos, NULL, NULL);
62
63 loop = g_main_loop_new(NULL, FALSE);
64 g_main_loop_run(loop);
65}
066
=== added file 'libcore/tests/MarlinIconInfoTests/marlincore-tests-icon-info.h'
--- libcore/tests/MarlinIconInfoTests/marlincore-tests-icon-info.h 1970-01-01 00:00:00 +0000
+++ libcore/tests/MarlinIconInfoTests/marlincore-tests-icon-info.h 2017-02-08 11:12:03 +0000
@@ -0,0 +1,28 @@
1/*
2 * Copyright (C) 2012, ammonkey <am.monkeyd@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#ifndef _H_MARLIN_CORE_TESTS_ICON_INFO
21#define _H_MARLIN_CORE_TESTS_ICON_INFO
22
23#include "gof-file.h"
24#include "marlin-icon-info.h"
25
26void marlincore_tests_icon_info (void);
27
28#endif
029
=== added file 'libcore/tests/MarlinIconInfoTests/tests.c'
--- libcore/tests/MarlinIconInfoTests/tests.c 1970-01-01 00:00:00 +0000
+++ libcore/tests/MarlinIconInfoTests/tests.c 2017-02-08 11:12:03 +0000
@@ -0,0 +1,34 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <gio/gio.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include "marlincore-tests-icon-info.h"
24#include "pantheon-files-core.h"
25
26int main (int argc, char* argv[])
27{
28 g_test_init (&argc, &argv, NULL);
29
30 /* only used for local tests with local files */
31 g_test_add_func ("/marlin/icon_info", marlincore_tests_icon_info);
32
33 return g_test_run();
34}
035
=== added directory 'libcore/tests/UtilTests'
=== added file 'libcore/tests/UtilTests/CMakeLists.txt'
--- libcore/tests/UtilTests/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ libcore/tests/UtilTests/CMakeLists.txt 2017-02-08 11:12:03 +0000
@@ -0,0 +1,45 @@
1set (PKGNAME pantheon-files-core)
2set (PKGNAME_ PANTHEON_FILES_CORE)
3set (${PKGNAME_}_VERSION 0.1)
4# increase the version number if you break the API
5
6include_directories(${CMAKE_BINARY_DIR})
7include_directories(${CMAKE_CURRENT_SOURCE_DIR})
8
9set (CFLAGS
10 ${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER}
11)
12
13set (LIB_PATHS
14 ${DEPS_LIBRARY_DIRS}
15)
16
17link_directories (${LIB_PATHS})
18add_definitions (${CFLAGS} -O2)
19
20vala_precompile (VALA_TEST_C ${PKGNAME}-vala_tests
21 UtilTests.vala
22 PACKAGES
23 granite
24 gtk+-3.0
25 gio-2.0
26 gee-0.8
27 gmodule-2.0
28 libcanberra
29 pantheon-files-core
30 pantheon-files-core-C
31 OPTIONS
32 --vapidir=${CMAKE_CURRENT_SOURCE_DIR}/
33 --thread
34 --target-glib=2.32 # Needed for new thread API
35)
36
37add_executable (${PKGNAME}-vala_tests
38 ${VALA_TEST_C}
39)
40
41target_link_libraries (${PKGNAME}-vala_tests pantheon-files-core ${DEPS_LIBRARIES})
42add_dependencies (${PKGNAME}-vala_tests pantheon-files-core)
43
44add_test (core-vala-tests ${PKGNAME}-vala_tests)
45
046
=== renamed file 'libcore/tests/Tests.vala' => 'libcore/tests/UtilTests/UtilTests.vala'
=== removed file 'libcore/tests/marlincore-tests-file.c'
--- libcore/tests/marlincore-tests-file.c 2017-01-05 19:16:00 +0000
+++ libcore/tests/marlincore-tests-file.c 1970-01-01 00:00:00 +0000
@@ -1,100 +0,0 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <stdlib.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include <gio/gio.h>
24#include "marlincore-tests-file.h"
25#include "pantheon-files-core.h"
26#include "gof-file.h"
27
28GMainLoop* loop;
29
30static gboolean fatal_handler(const gchar* log_domain,
31 GLogLevelFlags log_level,
32 const gchar* message,
33 gpointer user_data)
34{
35 return FALSE;
36}
37
38static void second_load_done(GOFDirectoryAsync* dir, gpointer data)
39{
40 g_message ("%s", G_STRFUNC);
41 g_assert_cmpint(dir->file->exists, ==, TRUE);
42
43 GOFDirectoryAsync *dir2 = gof_directory_async_from_file(dir->file);
44 g_assert_cmpint(dir->files_count, ==, dir2->files_count);
45 g_message ("files_count %u", dir->files_count);
46 g_object_unref (dir2);
47
48 /* some files testing inside a cached directory */
49 GOFFile *f1 = gof_file_get_by_uri ("file:///tmp/marlin-test/a");
50 g_object_unref (f1);
51
52 GOFFile *f2 = gof_file_get_by_uri ("file:///tmp/marlin-test/a");
53 g_object_unref (f2);
54
55 /* use a marlin function would show a dialog, FIXME */
56 system("rm -rf /tmp/marlin-test");
57 /* free previously allocated dir */
58 g_object_unref (dir);
59
60 g_main_loop_quit(loop);
61
62}
63
64static void first_load_done(GOFDirectoryAsync* dir, gpointer data)
65{
66 g_message ("%s", G_STRFUNC);
67 g_assert_cmpint(dir->file->exists, ==, FALSE);
68
69 system("mkdir /tmp/marlin-test");
70 system("touch /tmp/marlin-test/a");
71 system("touch /tmp/marlin-test/b");
72 system("touch /tmp/marlin-test/c");
73 system("touch /tmp/marlin-test/d");
74
75 /* we use cached directories so better block this callback */
76 g_signal_handlers_block_by_func (dir, first_load_done, NULL);
77
78 GOFDirectoryAsync *dir2;
79 dir2 = gof_directory_async_from_file(dir->file);
80 g_signal_connect(dir2, "done_loading", (GCallback) second_load_done, NULL);
81 gof_directory_async_init(dir2, NULL, NULL);
82
83 /* free previously allocated dir */
84 g_object_unref (dir);
85}
86
87void marlincore_tests_file(void)
88{
89 GOFDirectoryAsync* dir;
90
91 g_test_log_set_fatal_handler(fatal_handler, NULL);
92 system("rm -rf /tmp/marlin-test");
93
94 dir = gof_directory_async_from_gfile(g_file_new_for_path("/tmp/marlin-test"));
95 g_signal_connect(dir, "done_loading", (GCallback) first_load_done, NULL);
96 gof_directory_async_init(dir, NULL, NULL);
97
98 loop = g_main_loop_new(NULL, FALSE);
99 g_main_loop_run(loop);
100}
1010
=== removed file 'libcore/tests/marlincore-tests-file.h'
--- libcore/tests/marlincore-tests-file.h 2011-05-12 19:41:47 +0000
+++ libcore/tests/marlincore-tests-file.h 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#ifndef _H_MARLIN_CORE_TESTS_FILE
21#define _H_MARLIN_CORE_TESTS_FILE
22
23#include "gof-file.h"
24
25void marlincore_tests_file(void);
26
27#endif
280
=== removed file 'libcore/tests/marlincore-tests-gof.c'
--- libcore/tests/marlincore-tests-gof.c 2017-01-05 19:16:00 +0000
+++ libcore/tests/marlincore-tests-gof.c 1970-01-01 00:00:00 +0000
@@ -1,99 +0,0 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <stdlib.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include <gio/gio.h>
24#include "marlincore-tests-gof.h"
25
26
27static gboolean fatal_handler(const gchar* log_domain,
28 GLogLevelFlags log_level,
29 const gchar* message,
30 gpointer user_data)
31{
32 return FALSE;
33}
34
35
36void marlincore_tests_goffile(void)
37{
38 GOFFile* file;
39
40 g_test_log_set_fatal_handler(fatal_handler, NULL);
41 /* The URI is valid, the target exists */
42 file = gof_file_get_by_uri("file:///usr/share");
43 g_assert(file != NULL);
44 gof_file_query_update (file);
45 g_assert(file != NULL);
46 g_assert(file->info != NULL);
47 g_assert_cmpstr(g_file_info_get_name (file->info), ==, "share");
48 g_assert_cmpstr(g_file_info_get_display_name (file->info), ==, "share");
49 g_assert_cmpstr(file->basename, ==, "share");
50 g_assert_cmpint(file->is_directory, ==, TRUE);
51 g_assert_cmpint(file->is_hidden, ==, FALSE);
52 g_assert_cmpstr(gof_file_get_ftype (file), ==, "inode/directory");
53 g_assert_cmpint(gof_file_is_symlink(file), ==, FALSE);
54 /* TODO: formated_type needs a test too, but there are some issues with
55 * translations. */
56 g_assert_cmpstr(g_file_get_uri(file->location), ==, "file:///usr/share");
57 g_assert_cmpstr(gof_file_get_uri(file), ==, "file:///usr/share");
58
59 /* some allocations tests */
60 int i;
61 for (i=0; i<5; i++) {
62 GFile *location = g_file_new_for_path ("/usr/share");
63 file = gof_file_get(location);
64 g_object_unref (location);
65 }
66 for (i=0; i<5; i++)
67 g_object_unref (file);
68 /* we got to remove the file from the cache other the next cache lookup */
69 gof_file_remove_from_caches (file);
70 g_object_unref (file);
71 file = gof_file_get_by_uri("file:///usr/share");
72 g_object_unref (file);
73
74
75 /* The URI is valid, the target doesn't exist */
76 g_test_log_set_fatal_handler(fatal_handler, NULL);
77 file = gof_file_get_by_uri("file:///tmp/very/long/path/azerty");
78 g_assert(file != NULL);
79
80 system("rm /tmp/.marlin_backup /tmp/marlin_sym -f && touch /tmp/.marlin_backup");
81 /* The URI is valid, the target exists */
82 file = gof_file_get_by_uri("file:///tmp/.marlin_backup");
83 gof_file_query_update (file);
84 g_assert(file != NULL);
85 g_assert_cmpint(file->is_directory, ==, FALSE);
86 g_assert_cmpint(file->is_hidden, ==, TRUE); /* it's a backup, so, it's hidden */
87 g_assert_cmpint(file->size, ==, 0); /* the file is empty since we just create it it */
88
89 system("ln -s /tmp/marlin_backup~ /tmp/marlin_sym ");
90
91 /* a symlink */
92 file = gof_file_get_by_uri("file:///tmp/marlin_sym");
93 gof_file_query_update (file);
94 g_assert(file != NULL);
95 g_assert_cmpstr(gof_file_get_symlink_target(file), ==, "/tmp/marlin_backup~");
96 g_assert_cmpint(gof_file_is_symlink(file), ==, TRUE);
97 g_assert_cmpint(file->is_directory, ==, FALSE);
98 g_assert_cmpint(file->is_hidden, ==, FALSE);
99}
1000
=== removed file 'libcore/tests/marlincore-tests-gof.h'
--- libcore/tests/marlincore-tests-gof.h 2011-05-10 07:52:36 +0000
+++ libcore/tests/marlincore-tests-gof.h 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#ifndef _H_MARLIN_CORE_TESTS_GOF
21#define _H_MARLIN_CORE_TESTS_GOF
22
23#include "gof-file.h"
24
25void marlincore_tests_goffile(void);
26
27#endif
280
=== removed file 'libcore/tests/marlincore-tests-icon-info.c'
--- libcore/tests/marlincore-tests-icon-info.c 2017-02-01 17:03:01 +0000
+++ libcore/tests/marlincore-tests-icon-info.c 1970-01-01 00:00:00 +0000
@@ -1,65 +0,0 @@
1/*
2 * Copyright (C) 2012, ammonkey <am.monkeyd@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <stdlib.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include <gio/gio.h>
24#include "marlincore-tests-icon-info.h"
25
26GMainLoop* loop;
27
28static gboolean fatal_handler(const gchar* log_domain,
29 GLogLevelFlags log_level,
30 const gchar* message,
31 gpointer user_data)
32{
33 return FALSE;
34}
35
36static gboolean
37show_infos (gpointer data)
38{
39 marlin_icon_info_infos_caches ();
40 g_main_loop_quit (loop);
41
42 return FALSE;
43}
44
45void marlincore_tests_icon_info (void)
46{
47 GOFFile* file;
48 g_test_log_set_fatal_handler (fatal_handler, NULL);
49 /* The URI is valid, the target exists */
50 file = gof_file_get_by_uri ("file:///usr/share/icons/hicolor/16x16/apps/system-file-manager.svg");
51 g_assert(file != NULL);
52 gof_file_query_update (file);
53 g_assert(file->pix == NULL);
54 file->flags = 2;
55 gof_file_update_icon (file, 128);
56 g_assert(file->pix != NULL);
57 gof_file_update_icon (file, 32);
58 /*gof_file_update_icon (file, 16);*/
59 g_message ("pix ref count %u", G_OBJECT (file->pix)->ref_count);
60 g_object_unref (file->pix);
61 g_timeout_add_seconds_full (0, 2, show_infos, NULL, NULL);
62
63 loop = g_main_loop_new(NULL, FALSE);
64 g_main_loop_run(loop);
65}
660
=== removed file 'libcore/tests/marlincore-tests-icon-info.h'
--- libcore/tests/marlincore-tests-icon-info.h 2012-01-14 22:01:23 +0000
+++ libcore/tests/marlincore-tests-icon-info.h 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
1/*
2 * Copyright (C) 2012, ammonkey <am.monkeyd@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#ifndef _H_MARLIN_CORE_TESTS_ICON_INFO
21#define _H_MARLIN_CORE_TESTS_ICON_INFO
22
23#include "gof-file.h"
24#include "marlin-icon-info.h"
25
26void marlincore_tests_icon_info (void);
27
28#endif
290
=== removed file 'libcore/tests/tests.c'
--- libcore/tests/tests.c 2017-02-01 17:03:01 +0000
+++ libcore/tests/tests.c 1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
1/*
2 * Copyright (C) 2011, Lucas Baudin <xapantu@gmail.com>
3 *
4 * Marlin is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * Marlin is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 *
18 */
19
20#include <gio/gio.h>
21#include <gtk/gtk.h>
22#include <glib.h>
23#include "marlincore-tests-gof.h"
24#include "marlincore-tests-file.h"
25#include "marlincore-tests-icon-info.h"
26#include "pantheon-files-core.h"
27
28int main (int argc, char* argv[])
29{
30 g_test_init (&argc, &argv, NULL);
31
32 g_test_add_func("/marlin/file", marlincore_tests_file);
33 g_test_add_func("/marlin/goffile", marlincore_tests_goffile);
34 /* only used for local tests with local files */
35 g_test_add_func ("/marlin/icon_info", marlincore_tests_icon_info);
36
37 return g_test_run();
38}

Subscribers

People subscribed via source and target branches

to all changes: