Line data Source code
1 : /* test_addr_ibterfaces.cpp
2 : * Copyright (C) 2011-2017 Made to Order Software Corporation
3 : *
4 : * Project: http://snapwebsites.org/project/libaddr
5 : *
6 : * Permission is hereby granted, free of charge, to any
7 : * person obtaining a copy of this software and
8 : * associated documentation files (the "Software"), to
9 : * deal in the Software without restriction, including
10 : * without limitation the rights to use, copy, modify,
11 : * merge, publish, distribute, sublicense, and/or sell
12 : * copies of the Software, and to permit persons to whom
13 : * the Software is furnished to do so, subject to the
14 : * following conditions:
15 : *
16 : * The above copyright notice and this permission notice
17 : * shall be included in all copies or substantial
18 : * portions of the Software.
19 : *
20 : * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
21 : * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 : * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
23 : * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
24 : * EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 : * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26 : * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
27 : * ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28 : * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 : * SOFTWARE.
30 : */
31 :
32 : #include "test_addr_main.h"
33 : #include "libaddr/addr.h"
34 :
35 : #include <sstream>
36 : #include <fstream>
37 :
38 : #include <string.h>
39 : #include <unistd.h>
40 : #include <limits.h>
41 :
42 :
43 :
44 3 : TEST_CASE( "ipv4::interfaces", "ipv4" )
45 : {
46 2 : GIVEN("addr::get_local_addresses()")
47 : {
48 2 : addr::addr::vector_t list(addr::addr::get_local_addresses());
49 :
50 2 : SECTION("verify list")
51 : {
52 1 : REQUIRE_FALSE(list.empty()); // at least "lo"
53 :
54 : // add stuff like verify there is an "lo" entry?
55 : }
56 : }
57 7 : }
58 :
59 :
60 :
61 :
62 :
63 : // vim: ts=4 sw=4 et
|