diff options
author | Thomas Haller <thaller@redhat.com> | 2015-04-14 22:34:01 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-06-05 16:52:50 +0200 |
commit | ce700d94f54eae64d0f3aac0c6ef50a051dd9a2b (patch) | |
tree | 85f234e98fcb60dcd75472206d9378a2a28408ae /src/platform/tests/test-general.c | |
parent | d7a312d17a09b748d5aa06d7dfbebc66f0e8cf68 (diff) |
platform: add nm-platform-utils.[ch] files
There is no general purpose file for platform utilities.
We only have nm-platform.h, which contains (mostly) functions
that operate on a NMPlatform instance (and that can be mocked
using NMFakePlatform).
Add a new file for independent utility functions. nm-platform-utils.c
should not call into functions having a NMPlatform instance, to
have them independent from platform caching and the platform
singleton.
Diffstat (limited to 'src/platform/tests/test-general.c')
-rw-r--r-- | src/platform/tests/test-general.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/platform/tests/test-general.c b/src/platform/tests/test-general.c new file mode 100644 index 000000000..2f29d7de7 --- /dev/null +++ b/src/platform/tests/test-general.c @@ -0,0 +1,38 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* nm-platform.c - Handle runtime kernel networking configuration + * + * 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; either version 2, or (at your option) + * any later version. + * + * 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 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. + * + * Copyright (C) 2015 Red Hat, Inc. + */ + +#include "nm-platform-utils.h" + +#include "nm-logging.h" + +#include "nm-test-utils.h" + + +/******************************************************************/ + +NMTST_DEFINE (); + +int +main (int argc, char **argv) +{ + nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT"); + + return g_test_run (); +} |