]>
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 /* init memory pools */
25 * we can construct a URL with a URLScheme.
26 * This creates a URL for that scheme.
29 testURL::testConstructScheme()
31 URLScheme empty_scheme
;
32 URL
protoless_url(AnyP::PROTO_NONE
);
33 CPPUNIT_ASSERT_EQUAL(empty_scheme
, protoless_url
.getScheme());
35 URLScheme
ftp_scheme(AnyP::PROTO_FTP
);
36 URL
ftp_url(AnyP::PROTO_FTP
);
37 CPPUNIT_ASSERT_EQUAL(ftp_scheme
, ftp_url
.getScheme());
41 * a default constructed URL has scheme "NONE".
42 * Also, we should be able to use new and delete on
46 testURL::testDefaultConstructor()
50 CPPUNIT_ASSERT_EQUAL(aScheme
, aUrl
.getScheme());
52 URL
*urlPointer
= new URL
;
53 CPPUNIT_ASSERT(urlPointer
!= NULL
);