]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testAddress.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / tests / testAddress.h
1 /*
2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_SRC_TEST_IPADDRESS_H
10 #define SQUID_SRC_TEST_IPADDRESS_H
11
12 #include <cppunit/extensions/HelperMacros.h>
13
14 /*
15 * test the IP storage type
16 */
17
18 class testIpAddress : public CPPUNIT_NS::TestFixture
19 {
20 CPPUNIT_TEST_SUITE( testIpAddress );
21 CPPUNIT_TEST( testDefaults );
22 CPPUNIT_TEST( testInAddrConstructor );
23 CPPUNIT_TEST( testInAddr6Constructor );
24 CPPUNIT_TEST( testSockAddrConstructor );
25 CPPUNIT_TEST( testSockAddr6Constructor );
26 CPPUNIT_TEST( testHostentConstructor );
27 CPPUNIT_TEST( testStringConstructor );
28 CPPUNIT_TEST( testCopyConstructor );
29 CPPUNIT_TEST( testsetEmpty );
30 CPPUNIT_TEST( testBooleans );
31 CPPUNIT_TEST( testAddrInfo );
32 CPPUNIT_TEST( testtoStr );
33 CPPUNIT_TEST( testtoUrl_fromInAddr );
34 CPPUNIT_TEST( testtoUrl_fromSockAddr );
35 CPPUNIT_TEST( testgetReverseString );
36 CPPUNIT_TEST( testMasking );
37
38 CPPUNIT_TEST( testBugNullingDisplay );
39 CPPUNIT_TEST_SUITE_END();
40
41 public:
42
43 protected:
44 void testDefaults();
45
46 void testInAddrConstructor();
47 void testInAddr6Constructor();
48 void testSockAddrConstructor();
49 void testSockAddr6Constructor();
50 void testHostentConstructor();
51 void testStringConstructor();
52 void testCopyConstructor();
53
54 void testsetEmpty();
55 void testBooleans();
56
57 void testAddrInfo();
58
59 void testtoStr();
60 void testtoUrl_fromInAddr();
61 void testtoUrl_fromSockAddr();
62 void testgetReverseString();
63 void testMasking();
64
65 // bugs.
66 void testBugNullingDisplay();
67
68 };
69
70 #endif /* SQUID_SRC_TEST_IPADDRESS_H */
71