Rudimentary TUri test macro.
{
Printf(
"\tERROR: %s => %s (should read: %s)", reference.
GetUri().Data(),
actual.GetUri().Data(), nominal.
GetUri().Data());
}
{
}
{
for (char i = 0; i < 127; i++) {
char buffer[10];
}
}
else
}
{
TString composed =
"http://user:pass@host.org/some/path/file.avi?key1=value1#anchor3";
uri.SetUserInfo(
"user:pass");
uri.SetPath(
"/some/path/file.avi");
uri.SetQuery(
"key1=value1");
uri.SetFragment(
"anchor3");
}
{
else
Printf(
"---> F A I L E D F A I L E D F A I L E D\n");
}
{
valid &=
TUri(
"urn:oasis:names:specification:docbook:dtd:xml:4.1.2").
IsUri();
}
{
Printf(
"\n\nTUri test macro ...");
Printf(
"---> Reference Resolution");
Printf(
"---> PCT Conversion");
Printf(
"---> Equivalence and Normalisation");
Answer(
TUri(
"example://a/b/c/%7Bfoo%7D") ==
TUri(
"eXAMPLE://a/./b/../b/%63/%7bfoo%7d"));
}
bool Bool_t
Boolean (0=false, 1=true) (bool)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
This class represents a RFC 3986 compatible URI.
Bool_t IsUri() const
Returns kTRUE if instance qualifies as URI URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] ...
static const TString PctEncode(const TString &source)
Percent-encode and return the given string according to RFC 3986 in principle, this function cannot f...
const TString GetUri() const
Returns the whole URI - an implementation of chapter 5.3 component recomposition.
static TUri Transform(const TUri &reference, const TUri &base)
Transform a URI reference into its target URI using given a base URI.
static const TString PctDecode(const TString &source)
Percent-decode the given string according to chapter 2.1 we assume a valid pct-encoded string.
- Author
- Gerhard E. Bruckner 2007-10-18
Definition in file TUriTest.C.