LCOV - code coverage report
Current view: top level - tests - vector-style.c (source / functions) Hit Total Coverage
Test: Code coverage Lines: 13 13 100.0 %
Date: 2024-05-11 21:41:31 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 4 8 50.0 %

           Branch data     Line data    Source code
       1                 :            : #undef G_DISABLE_ASSERT
       2                 :            : 
       3                 :            : #include <gtk/gtk.h>
       4                 :            : #include <shumate/shumate.h>
       5                 :            : 
       6                 :            : static void
       7                 :          3 : test_vector_style_create (void)
       8                 :            : {
       9                 :          3 :   GError *error = NULL;
      10                 :          6 :   g_autoptr(GBytes) style_json = NULL;
      11         [ +  - ]:          3 :   g_autoptr(ShumateVectorRenderer) renderer = NULL;
      12                 :            : 
      13                 :          3 :   style_json = g_resources_lookup_data ("/org/gnome/shumate/Tests/style.json", G_RESOURCE_LOOKUP_FLAGS_NONE, NULL);
      14         [ -  + ]:          3 :   g_assert_no_error (error);
      15                 :            : 
      16                 :          3 :   renderer = shumate_vector_renderer_new ("", g_bytes_get_data (style_json, NULL), &error);
      17   [ -  +  +  - ]:          3 :   g_assert_no_error (error);
      18                 :          3 : }
      19                 :            : 
      20                 :            : int
      21                 :          3 : main (int argc, char *argv[])
      22                 :            : {
      23                 :          3 :   g_test_init (&argc, &argv, NULL);
      24                 :            : 
      25                 :          3 :   g_test_add_func ("/vector-style/create", test_vector_style_create);
      26                 :            : 
      27                 :          3 :   return g_test_run ();
      28                 :            : }

Generated by: LCOV version 1.14