File: check_arp.c

package info (click to toggle)
libdumbnet 1.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,768 kB
  • sloc: ansic: 11,563; sh: 4,203; python: 261; makefile: 92
file content (76 lines) | stat: -rw-r--r-- 1,124 bytes parent folder | download | duplicates (2)
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
64
65
66
67
68
69
70
71
72
73
74
75
76

#include <sys/types.h>

#include <dumbnet.h>

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <check.h>

START_TEST(test_arp_pack)
{
}
END_TEST

START_TEST(test_arp_openclose)
{
	arp_t	*a;

	fail_unless((a = arp_open()) != NULL, "open failed");
	fail_unless((a = arp_close(a)) == NULL, "close failed");
}
END_TEST

START_TEST(test_arp_add)
{
	
}
END_TEST

START_TEST(test_arp_delete)
{
}
END_TEST

START_TEST(test_arp_get)
{
}
END_TEST

START_TEST(test_arp_loop)
{
}
END_TEST

Suite *
arp_suite(void)
{
	Suite *s = suite_create("arp");
	TCase *tc_core = tcase_create("core");

	suite_add_tcase(s, tc_core);
	tcase_add_test(tc_core, test_arp_pack);
	tcase_add_test(tc_core, test_arp_openclose);
	tcase_add_test(tc_core, test_arp_add);
	tcase_add_test(tc_core, test_arp_delete);
	tcase_add_test(tc_core, test_arp_get);
	tcase_add_test(tc_core, test_arp_loop);
	
	return (s);
}

int
main(void)
{
	Suite *s = arp_suite();
	SRunner *sr = srunner_create(s);
	int nf;
	
	srunner_run_all (sr, CK_NORMAL);
	nf = srunner_ntests_failed(sr);
	srunner_free(sr);
	
	return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}