Branch data Line data Source code
1 : : /*
2 : : * Copyright 2022 Collabora Ltd.
3 : : * SPDX-License-Identifier: LGPL-2.1-or-later
4 : : *
5 : : * This library is free software; you can redistribute it and/or
6 : : * modify it under the terms of the GNU Lesser General Public
7 : : * License as published by the Free Software Foundation; either
8 : : * version 2.1 of the License, or (at your option) any later version.
9 : : *
10 : : * This library is distributed in the hope that it will be useful,
11 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 : : * Lesser General Public License for more details.
14 : : *
15 : : * You should have received a copy of the GNU Lesser General
16 : : * Public License along with this library; if not, see
17 : : * <http://www.gnu.org/licenses/>.
18 : : */
19 : :
20 : : #ifndef GLIB_VERSION_MAX_ALLOWED
21 : : /* This is the oldest version macro available */
22 : : #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_26
23 : : #define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_26
24 : : #endif
25 : :
26 : : #include <glib.h>
27 : :
28 : : /* All the headers that can validly be included in third-party code */
29 : : #include <glib-object.h>
30 : : #include <gobject/gvaluecollector.h>
31 : :
32 : : static void
33 : 1 : nothing (void)
34 : : {
35 : : /* This doesn't really do anything: the real "test" is at compile time.
36 : : * Just make sure the GObject library gets linked. */
37 : 1 : g_debug ("Loaded %s", g_type_name (G_TYPE_OBJECT));
38 : 1 : }
39 : :
40 : : int
41 : 1 : main (int argc,
42 : : char *argv[])
43 : : {
44 : 1 : g_test_init (&argc, &argv, NULL);
45 : :
46 : 1 : g_test_add_func ("/max-version/tested-at-compile-time", nothing);
47 : 1 : return g_test_run ();
48 : : }
|