mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-19 08:30:09 +00:00
Put all GtkTreeModel unit tests in a single binary
This to reduce linking time and have all tests in a single binary.
This commit is contained in:
parent
a14cecb0ad
commit
2cb9f03a66
@ -27,13 +27,9 @@ TEST_PROGS += testing
|
||||
testing_SOURCES = testing.c
|
||||
testing_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += liststore
|
||||
liststore_SOURCES = liststore.c
|
||||
liststore_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += treestore
|
||||
treestore_SOURCES = treestore.c
|
||||
treestore_LDADD = $(progs_ldadd)
|
||||
TEST_PROGS += treemodel
|
||||
treemodel_SOURCES = treemodel.c liststore.c treestore.c filtermodel.c
|
||||
treemodel_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += treeview
|
||||
treeview_SOURCES = treeview.c
|
||||
@ -86,10 +82,6 @@ TEST_PROGS += textiter
|
||||
textiter_SOURCES = textiter.c
|
||||
textiter_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += filtermodel
|
||||
filtermodel_SOURCES = filtermodel.c
|
||||
filtermodel_LDADD = $(progs_ldadd)
|
||||
|
||||
TEST_PROGS += expander
|
||||
expander_SOURCES = expander.c
|
||||
expander_LDADD = $(progs_ldadd)
|
||||
|
@ -2823,12 +2823,9 @@ specific_bug_549287 (void)
|
||||
|
||||
/* main */
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char **argv)
|
||||
void
|
||||
register_filter_model_tests (void)
|
||||
{
|
||||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
g_test_add ("/FilterModel/self/verify-test-suite",
|
||||
FilterTest, NULL,
|
||||
filter_test_setup,
|
||||
@ -2995,6 +2992,4 @@ main (int argc,
|
||||
specific_bug_540201);
|
||||
g_test_add_func ("/FilterModel/specific/bug-549287",
|
||||
specific_bug_549287);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
@ -27,6 +27,8 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "treemodel.h"
|
||||
|
||||
static inline gboolean
|
||||
iters_equal (GtkTreeIter *a,
|
||||
GtkTreeIter *b)
|
||||
@ -998,12 +1000,9 @@ list_store_test_iter_parent_invalid (ListStore *fixture,
|
||||
|
||||
/* main */
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char **argv)
|
||||
void
|
||||
register_list_store_tests (void)
|
||||
{
|
||||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
/* insertion */
|
||||
g_test_add_func ("/list-store/insert-high-values",
|
||||
list_store_test_insert_high_values);
|
||||
@ -1120,6 +1119,4 @@ main (int argc,
|
||||
g_test_add ("/list-store/iter-parent-invalid", ListStore, NULL,
|
||||
list_store_setup, list_store_test_iter_parent_invalid,
|
||||
list_store_teardown);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
35
gtk/tests/treemodel.c
Normal file
35
gtk/tests/treemodel.c
Normal file
@ -0,0 +1,35 @@
|
||||
/* Main wrapper for TreeModel test suite.
|
||||
* Copyright (C) 2011 Kristian Rietveld <kris@gtk.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "treemodel.h"
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char **argv)
|
||||
{
|
||||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
register_list_store_tests ();
|
||||
register_tree_store_tests ();
|
||||
register_filter_model_tests ();
|
||||
|
||||
return g_test_run ();
|
||||
}
|
22
gtk/tests/treemodel.h
Normal file
22
gtk/tests/treemodel.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* Main wrapper for TreeModel test suite.
|
||||
* Copyright (C) 2011 Kristian Rietveld <kris@gtk.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void register_list_store_tests ();
|
||||
void register_tree_store_tests ();
|
||||
void register_filter_model_tests ();
|
@ -1001,12 +1001,9 @@ tree_store_test_iter_parent_invalid (TreeStore *fixture,
|
||||
|
||||
/* main */
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char **argv)
|
||||
void
|
||||
register_tree_store_tests (void)
|
||||
{
|
||||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
/* insertion */
|
||||
g_test_add_func ("/tree-store/insert-high-values",
|
||||
tree_store_test_insert_high_values);
|
||||
@ -1123,6 +1120,4 @@ main (int argc,
|
||||
g_test_add ("/tree-store/iter-parent-invalid", TreeStore, NULL,
|
||||
tree_store_setup, tree_store_test_iter_parent_invalid,
|
||||
tree_store_teardown);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user