MCPcopy Create free account
hub / github.com/comaps/comaps / ~TestUrl

Method ~TestUrl

libs/coding/coding_tests/url_tests.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 }
41
42 ~TestUrl()
43 {
44 Url url(m_url);
45 TEST_EQUAL(url.GetScheme(), m_scheme, ());
46 TEST_EQUAL(url.GetHost(), m_host, ());
47 TEST_EQUAL(url.GetPath(), m_path, ());
48
49 TEST(!m_scheme.empty() || !url.IsValid(), ("Scheme is empty if and only if url is invalid!"));
50
51 url.ForEachParam([this](string const & name, string const & value)
52 {
53 TEST(!m_keyValuePairs.empty(), ("Failed for url = ", m_url));
54 TEST_EQUAL(m_keyValuePairs.front().first, name, ());
55 TEST_EQUAL(m_keyValuePairs.front().second, value, ());
56 m_keyValuePairs.pop();
57 });
58 }
59
60private:
61 string m_url, m_scheme, m_host, m_path;

Callers

nothing calls this directly

Calls 7

TESTFunction · 0.85
ForEachParamMethod · 0.80
frontMethod · 0.80
popMethod · 0.80
GetPathMethod · 0.45
emptyMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected