LCOV - code coverage report
Current view: top level - subprojects/gobject-introspection-tests - drawable.c (source / functions) Coverage Total Hit
Test: gjs-1.87.2 Code Coverage Lines: 100.0 % 19 19
Test Date: 2026-02-11 15:09:51 Functions: 100.0 % 9 9
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 87.5 % 8 7

             Branch data     Line data    Source code
       1                 :             : /*
       2                 :             : SPDX-License-Identifier: GPL-2.0-or-later AND LGPL-2.0-or-later AND MIT
       3                 :             : SPDX-FileCopyrightText: 2008 Colin Walters <walters@verbum.org>
       4                 :             : SPDX-FileCopyrightText: 2008 Johan Bilien
       5                 :             : SPDX-FileCopyrightText: 2008 Johan Dahlin
       6                 :             : */
       7                 :             : 
       8                 :             : #include <gio/gio.h>
       9                 :             : 
      10                 :             : #include "drawable.h"
      11                 :             : 
      12   [ +  +  +  -  :          18 : G_DEFINE_ABSTRACT_TYPE (RegressTestInheritDrawable, regress_test_inherit_drawable, G_TYPE_OBJECT);
                   +  + ]
      13                 :             : 
      14                 :             : static void
      15                 :           2 : regress_test_inherit_drawable_class_init (RegressTestInheritDrawableClass *klass G_GNUC_UNUSED)
      16                 :             : {
      17                 :           2 : }
      18                 :             : 
      19                 :             : static void
      20                 :           1 : regress_test_inherit_drawable_init (RegressTestInheritDrawable *drawable G_GNUC_UNUSED)
      21                 :             : {
      22                 :           1 : }
      23                 :             : 
      24                 :             : void
      25                 :           1 : regress_test_inherit_drawable_do_foo (RegressTestInheritDrawable *drawable G_GNUC_UNUSED,
      26                 :             :                                       int x G_GNUC_UNUSED)
      27                 :             : {
      28                 :           1 : }
      29                 :             : 
      30                 :             : /**
      31                 :             :  * regress_test_inherit_drawable_get_origin:
      32                 :             :  * @drawable:
      33                 :             :  * @x: (out):
      34                 :             :  * @y: (out):
      35                 :             :  */
      36                 :             : void
      37                 :           1 : regress_test_inherit_drawable_get_origin (RegressTestInheritDrawable *drawable G_GNUC_UNUSED,
      38                 :             :                                           int *x,
      39                 :             :                                           int *y)
      40                 :             : {
      41                 :           1 :   *x = 0;
      42                 :           1 :   *y = 0;
      43                 :           1 : }
      44                 :             : 
      45                 :             : /**
      46                 :             :  * regress_test_inherit_drawable_get_size:
      47                 :             :  * @drawable:
      48                 :             :  * @width: (out):
      49                 :             :  * @height: (out):
      50                 :             :  */
      51                 :             : void
      52                 :           1 : regress_test_inherit_drawable_get_size (RegressTestInheritDrawable *drawable G_GNUC_UNUSED,
      53                 :             :                                         guint *width,
      54                 :             :                                         guint *height)
      55                 :             : {
      56                 :           1 :   *width = 42;
      57                 :           1 :   *height = 42;
      58                 :           1 : }
      59                 :             : 
      60                 :             : void
      61                 :           2 : regress_test_inherit_drawable_do_foo_maybe_throw (RegressTestInheritDrawable *drawable G_GNUC_UNUSED,
      62                 :             :                                                   int x,
      63                 :             :                                                   GError **error)
      64                 :             : {
      65         [ +  + ]:           2 :   if (x != 42)
      66                 :           1 :     g_set_error (error, G_IO_ERROR, 12, "The answer should be 42!");
      67                 :           2 : }
        

Generated by: LCOV version 2.0-1