diff options
author | Philip Withnall <withnall@endlessm.com> | 2018-08-01 15:58:56 +0100 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2018-08-01 15:59:02 +0100 |
commit | 0a711636ddc9bc8a1405629534bdec9ebca67e06 (patch) | |
tree | 32171dc0bbb8579094a89ddefbb7460a9f0f00d2 /tests/writer.c | |
parent | ed27f3703f45ebf1566fd96a262a1074959ee541 (diff) | |
download | dconf-0a711636ddc9bc8a1405629534bdec9ebca67e06.tar.gz |
WIP
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'tests/writer.c')
-rw-r--r-- | tests/writer.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/writer.c b/tests/writer.c new file mode 100644 index 0000000..92757d1 --- /dev/null +++ b/tests/writer.c @@ -0,0 +1,44 @@ +/* + * Copyright © 2018 Endless Mobile, Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the licence, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + * Author: Philip Withnall <withnall@endlessm.com> + */ + +#include <glib.h> + +#include "service/dconf-generated.h" +#include "service/dconf-writer.h" + +static void +test_writer_basic (void) +{ + g_autoptr(DConfWriter) writer = NULL; + + writer = dconf_writer_new (DCONF_TYPE_KEYFILE_WRITER, "some-name"); + g_assert_nonnull (writer); + + g_assert_cmpstr (dconf_writer_get_name (writer), ==, "some-name"); +} + +int +main (int argc, char **argv) +{ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/writer/basic", test_writer_basic); + + return g_test_run (); +} |