]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testURL.cc
1 #define SQUID_UNIT_TEST 1
4 #include <cppunit/TestAssert.h>
14 CPPUNIT_TEST_SUITE_REGISTRATION( testURL
);
16 /* stub functions to link successfully */
27 /* init memory pools */
36 * we can construct a URL with a URLScheme.
37 * This creates a URL for that scheme.
40 testURL::testConstructScheme()
42 URLScheme empty_scheme
;
43 URL
protoless_url(PROTO_NONE
);
44 CPPUNIT_ASSERT_EQUAL(empty_scheme
, protoless_url
.getScheme());
46 URLScheme
ftp_scheme(PROTO_FTP
);
47 URL
ftp_url(PROTO_FTP
);
48 CPPUNIT_ASSERT_EQUAL(ftp_scheme
, ftp_url
.getScheme());
52 * a default constructed URL has scheme "NONE".
53 * Also, we should be able to use new and delete on
57 testURL::testDefaultConstructor()
61 CPPUNIT_ASSERT_EQUAL(aScheme
, aUrl
.getScheme());
63 URL
*urlPointer
= new URL
;
64 CPPUNIT_ASSERT(urlPointer
!= NULL
);