Debian Codegraph @

testsuite/css/api.c

raw
1 /*
2 * Copyright (C) 2011 Canonical Inc.
3 *
4 * Author:
5 * Michael Terry <[email protected]>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <gtk/gtk.h>
22
23 static void
24 gtk_css_provider_load_data_not_null_terminated (void)
25 {
26 GtkCssProvider *p;
27 const gchar data[3] = {'*', '{', '}'};
28
29 p = gtk_css_provider_new();
30
31 gtk_css_provider_load_from_data(p, data, sizeof (data), NULL);
32
33 g_object_unref (p);
34 }
35
36
37 int
38 main (int argc, char *argv[])
39 {
40 gtk_test_init (&argc, &argv, NULL);
41
42 g_test_add_func ("/gtk_css_provider_load_data/not_null_terminated",
43 gtk_css_provider_load_data_not_null_terminated);
44
45 return g_test_run ();
46 }
47