test-socket-util.c revision 3b653205cf7bd3851befd0a9f6a3ded6e267c173
/***
This file is part of systemd
Copyright 2014 Ronny Chevalier
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "socket-util.h"
#include "in-addr-util.h"
#include "util.h"
#include "macro.h"
#include "log.h"
static void test_socket_address_parse(void) {
if (socket_ipv6_is_supported()) {
} else {
}
}
static void test_socket_address_parse_netlink(void) {
}
static void test_socket_address_equal(void) {
assert_se(!socket_address_equal(&a, &b));
assert_se(!socket_address_equal(&a, &b));
assert_se(!socket_address_equal(&a, &b));
assert_se(!socket_address_equal(&a, &b));
assert_se(socket_address_equal(&a, &b));
assert_se(socket_address_equal(&a, &b));
assert_se(socket_address_equal(&a, &b));
assert_se(socket_address_equal(&a, &b));
assert_se(socket_address_equal(&a, &b));
}
static void test_socket_address_get_path(void) {
assert_se(!socket_address_get_path(&a));
assert_se(!socket_address_get_path(&a));
assert_se(!socket_address_get_path(&a));
}
static void test_in_addr_prefix_intersect_one(unsigned f, const char *a, unsigned apl, const char *b, unsigned bpl, int result) {
}
static void test_in_addr_prefix_intersect(void) {
test_in_addr_prefix_intersect_one(AF_INET6, "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", 128, "ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffe", 128, 0);
test_in_addr_prefix_intersect_one(AF_INET6, "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", 0, "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", 128, 1);
test_in_addr_prefix_intersect_one(AF_INET6, "::", 0, "beef:beef:beef:beef:beef:beef:beef:beef", 128, 1);
}
static void test_in_addr_prefix_next_one(unsigned f, const char *before, unsigned pl, const char *after) {
t = ubefore;
if (after) {
}
}
static void test_in_addr_prefix_next(void) {
}
return 0;
}