reSIProcate/DialogUsageManager  9694
Functions
testDSI.cxx File Reference
#include "resip/dum/DialogUsageManager.hxx"
#include "resip/dum/Profile.hxx"
#include "rutil/Log.hxx"
Include dependency graph for testDSI.cxx:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 9 of file testDSI.cxx.

References resip::DialogSetId::hash(), and resip::Log::initialize().

{
    int level=(int)Log::DEBUG;
    if (argc > 1 ) level = atoi(argv[1]);

    Log::initialize(Log::COUT, (resip::Log::Level)level, argv[0]);


    DialogSetId a("a","a");
    DialogSetId b("a","b");
    DialogSetId c("b","a");
    DialogSetId d("b","b");
    DialogSetId e("a","a");

    assert( a == a );
    assert( ! (a < a ) );
    assert( a < b );
    assert( ! ( b < a ) );

    assert( a == a );
    assert( ! ( a > a ) );
    assert( b > a );
    assert( ! ( a >  b ) );

    cout << "a.hash()= " << a.hash() << endl;
    cout << "b.hash()= " << b.hash() << endl;
    cout << "e.hash()= " << e.hash() << endl;

    assert( a.hash() != b.hash() );
    assert( a.hash() == a.hash() );
    assert( a.hash() == e.hash() );

    cout << "test passed." << endl;

}

Here is the call graph for this function: