LCOV - code coverage report
Current view: top level - glib/gmodule/tests - max-version.c (source / functions) Hit Total Coverage
Test: unnamed Lines: 7 7 100.0 %
Date: 2024-04-30 05:17:35 Functions: 2 2 100.0 %
Branches: 1 2 50.0 %

           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                 :            : #include <gmodule.h>
      29                 :            : 
      30                 :            : static void
      31                 :          1 : nothing (void)
      32                 :            : {
      33                 :            :   /* This doesn't really do anything: the real "test" is at compile time.
      34                 :            :    * Just make sure the GModule library gets linked. */
      35         [ +  - ]:          1 :   g_debug ("GModule supported: %s", g_module_supported () ? "yes" : "no");
      36                 :          1 : }
      37                 :            : 
      38                 :            : int
      39                 :          1 : main (int   argc,
      40                 :            :       char *argv[])
      41                 :            : {
      42                 :          1 :   g_test_init (&argc, &argv, NULL);
      43                 :            : 
      44                 :          1 :   g_test_add_func ("/max-version/tested-at-compile-time", nothing);
      45                 :          1 :   return g_test_run ();
      46                 :            : }

Generated by: LCOV version 1.14