summaryrefslogtreecommitdiff
path: root/tests/set-properties/t-set-arrayv.c
blob: 766e96b650c7bb9d9f8293b8d19a566deb5c529a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 *  xfconf
 *
 *  Copyright (c) 2007 Brian Tarricone <bjt23@cornell.edu>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License ONLY.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#include "tests-common.h"

int
main(int argc,
     char **argv)
{
    XfconfChannel *channel;
    
    if(!xfconf_tests_start())
        return 1;
    
    channel = xfconf_channel_new(TEST_CHANNEL_NAME);
    
    {
        GPtrArray *arr = g_ptr_array_sized_new(3);
        GValue *val;
        
        val = g_new0(GValue, 1);
        g_value_init(val, G_TYPE_BOOLEAN);
        g_value_set_boolean(val, TRUE);
        g_ptr_array_add(arr, val);
        
        val = g_new0(GValue, 1);
        g_value_init(val, G_TYPE_INT64);
        g_value_set_int64(val, 5000000000LL);
        g_ptr_array_add(arr, val);
        
        val = g_new0(GValue, 1);
        g_value_init(val, G_TYPE_STRING);
        g_value_set_static_string(val, "test string");
        g_ptr_array_add(arr, val);
        
        TEST_OPERATION(xfconf_channel_set_arrayv(channel, test_array_property,
                                                 arr));
        
        xfconf_array_free(arr);
    }
    
    g_object_unref(G_OBJECT(channel));
    
    xfconf_tests_end();
    
    return 0;
}