reSIProcate/stack  9694
Defines | Functions
testAor.cxx File Reference
#include <memory>
#include <iostream>
#include "TestSupport.hxx"
#include "rutil/Logger.hxx"
#include "resip/stack/Aor.hxx"
Include dependency graph for testAor.cxx:

Go to the source code of this file.

Defines

#define RESIPROCATE_SUBSYSTEM   Subsystem::TEST

Functions

int main (int argc, char *argv[])

Define Documentation

#define RESIPROCATE_SUBSYSTEM   Subsystem::TEST

Definition at line 12 of file testAor.cxx.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 15 of file testAor.cxx.

References resip::Log::Cerr, resip::Log::Debug, resip::Aor::host(), resip::Log::initialize(), resip::Aor::port(), resip::Aor::scheme(), resip::Aor::user(), and resip::Aor::value().

{
   Log::Level l = Log::Debug;
   Log::initialize(Log::Cerr, l, argv[0]);
   
   {
      Aor aor("sip:speedy_AT_home.com@whistler.gloo.net:5062");
      assert(aor.scheme() == "sip");
      assert(aor.user() == "speedy_AT_home.com");
      assert(aor.port() = 5062);
      assert(aor.host() == "whistler.gloo.net");
      std::cerr << "aor.value() = " << aor.value() << std::endl;
      assert(aor.value() == "sip:speedy_AT_home.com@whistler.gloo.net:5062");
   }

   {
      Uri uri("sip:speedy_AT_home.com@whistler.gloo.net:5062");
      Aor aor(uri);
      assert(aor.scheme() == "sip");
      assert(aor.user() == "speedy_AT_home.com");
      assert(aor.port() = 5062);
      assert(aor.host() == "whistler.gloo.net");
      std::cerr << "aor.value() = " << aor.value() << std::endl;
      assert(aor.value() == "sip:speedy_AT_home.com@whistler.gloo.net:5062");
   }
   
   {
      Aor aor;
   }
}

Here is the call graph for this function: