MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / testInvalid

Method testInvalid

Tests/Libraries/Http/HttpURLParserTest.cpp:145–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void SC::HttpURLParserTest::testInvalid()
146{
147 HttpURLParser urlParser;
148 SC_TEST_EXPECT(not urlParser.parse("http:/site.com")); // missing double //
149 SC_TEST_EXPECT(not urlParser.parse("http.//site.com")); // wrong . instead of :
150 SC_TEST_EXPECT(not urlParser.parse("http//site.com")); // missing :
151 SC_TEST_EXPECT(not urlParser.parse("http://")); // missing host
152 SC_TEST_EXPECT(not urlParser.parse("http://a")); // no dot
153 SC_TEST_EXPECT(not urlParser.parse("http://site.com/asd dsa/")); // no space in paths
154 SC_TEST_EXPECT(not urlParser.parse("hppt://site.com")); // unknown protocol
155 SC_TEST_EXPECT(not urlParser.parse("http://exa mple.com/path"));
156 SC_TEST_EXPECT(not urlParser.parse("http://example.com/path\twith-tab"));
157 SC_TEST_EXPECT(not urlParser.parse("http://example.com/path?bad query"));
158 SC_TEST_EXPECT(not urlParser.parse("http://example.com/path#bad fragment"));
159}
160
161void SC::HttpURLParserTest::testCaseInsensitive()
162{

Callers

nothing calls this directly

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected