|
reSIProcate/stack
9694
|
#include <iostream>#include "TestSupport.hxx"#include "rutil/Logger.hxx"#include "resip/stack/ParserCategories.hxx"
Go to the source code of this file.
Classes | |
| class | TR |
Defines | |
| #define | RESIPROCATE_SUBSYSTEM Subsystem::TEST |
Functions | |
| int | main (int argc, char *argv[]) |
| #define RESIPROCATE_SUBSYSTEM Subsystem::TEST |
Definition at line 9 of file testParseNameAddr.cxx.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 40 of file testParseNameAddr.cxx.
References resip::Log::Cout, resip::Log::Debug, resip::NameAddr::displayName(), resip::Uri::host(), resip::Log::initialize(), resip::Uri::port(), resip::NameAddr::uri(), and resip::Uri::user().
{
Log::Level l = Log::Debug;
Log::initialize(Log::Cout, l, argv[0]);
{
TR _tr("Test odd name-addr from odd vendor");
Data data(
"~U90vw09jlMMs0OY7IIHzdD72c3<sip:~U90vw09jlMMs0OY7IIHzdD72c3@7.8.4.9:5066>");
Data alt ("alternate");
NameAddr illegal(data);
cerr<< "++ host: " << illegal.uri().host() << endl;
cerr<< "++ display-name: " << illegal.displayName() << endl;
cerr<< "++ user-info: " << illegal.uri().user() << endl;
assert( illegal.uri().host() == "7.8.4.9");
assert( illegal.displayName() == "~U90vw09jlMMs0OY7IIHzdD72c3");
assert( illegal.uri().port() == 5066 );
cerr << "++ " << illegal << endl;
illegal.displayName() = alt;
cerr << "++ " << illegal << endl;
assert( illegal.displayName() == alt);
}
return 0;
cerr << "All OK" << endl;
}

1.7.5.1