GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 13 / 0 / 13
Functions: 100.0% 2 / 0 / 2
Branches: 50.0% 4 / 0 / 8

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