File: test_nc_v6_interface_configured.c

package info (click to toggle)
netcfg 1.201
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,036 kB
  • sloc: ansic: 5,719; sh: 209; makefile: 83
file content (34 lines) | stat: -rw-r--r-- 653 bytes parent folder | download | duplicates (4)
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
#include "srunner.h"
#include "netcfg.h"

#include <stdlib.h>

START_TEST(test_nc_v6_interface_configured_simple)
{
	struct netcfg_interface iface;
	netcfg_interface_init(&iface);
	int rv;
	
	iface.name = "eth0";
	
	srunner_mock_path(__func__);
	
	rv = nc_v6_interface_configured(&iface, 0);
	
	ck_assert_msg(rv == 1, "Didn't find SLAAC");
	
	srunner_reset_path();
}
END_TEST

Suite *test_nc_v6_interface_configured_suite (void)
{
	Suite *s = suite_create ("nc_v6_interface_configured");
	
	TCase *tc = tcase_create ("nc_v6_interface_configured");
	tcase_add_test (tc, test_nc_v6_interface_configured_simple);
	
	suite_add_tcase (s, tc);
	
	return s;
}