LCOV - code coverage report
Current view: top level - gio/tests - portal-support-flatpak-none.c (source / functions) Coverage Total Hit
Test: unnamed Lines: 100.0 % 10 10
Test Date: 2024-11-26 05:23:01 Functions: 100.0 % 2 2
Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : /*
       2                 :             :  * GIO - GLib Input, Output and Streaming Library
       3                 :             :  *
       4                 :             :  * Copyright (C) 2022 Canonical Ltd.
       5                 :             :  *
       6                 :             :  * SPDX-License-Identifier: LGPL-2.1-or-later
       7                 :             :  *
       8                 :             :  * This library is free software; you can redistribute it and/or
       9                 :             :  * modify it under the terms of the GNU Lesser General Public
      10                 :             :  * License as published by the Free Software Foundation; either
      11                 :             :  * version 2.1 of the License, or (at your option) any later version.
      12                 :             :  *
      13                 :             :  * This library is distributed in the hope that it will be useful,
      14                 :             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      15                 :             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      16                 :             :  * Lesser General Public License for more details.
      17                 :             :  *
      18                 :             :  * You should have received a copy of the GNU Lesser General
      19                 :             :  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
      20                 :             :  *
      21                 :             :  * Author: Marco Trevisan <marco.trevisan@canonical.com>
      22                 :             :  */
      23                 :             : 
      24                 :             : #include "portal-support-utils.h"
      25                 :             : 
      26                 :             : #include "../gportalsupport.h"
      27                 :             : #include <gio/gio.h>
      28                 :             : 
      29                 :             : static void
      30                 :           1 : test_portal_support_flatpak_none (void)
      31                 :             : {
      32                 :           1 :   create_fake_flatpak_info (g_get_user_runtime_dir (), NULL, NULL);
      33                 :             : 
      34                 :           1 :   g_assert_true (glib_should_use_portal ());
      35                 :           1 :   g_assert_false (glib_network_available_in_sandbox ());
      36                 :           1 :   g_assert_false (glib_has_dconf_access_in_sandbox ());
      37                 :           1 : }
      38                 :             : 
      39                 :             : int
      40                 :           1 : main (int argc, char **argv)
      41                 :             : {
      42                 :           1 :   g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
      43                 :             : 
      44                 :           1 :   g_test_add_func ("/portal-support/flatpak/none", test_portal_support_flatpak_none);
      45                 :             : 
      46                 :           1 :   return g_test_run ();
      47                 :             : }
        

Generated by: LCOV version 2.0-1