// EdoTypeKey_t.cxx #include "EdoTypeKey.h" using std::string; using hes::EdoType; using hes::EdoKey; using hes::EdoTypeKey; int main() { string line = "--------------------------------------"; cout << line << endl; EdoType typ1(0x12345); EdoType typ2(0x24680); EdoKey key1("abc"); EdoKey key2("def"); assert( typ1.is_valid() ); assert( typ2.is_valid() ); assert( key1.is_valid() ); assert( key2.is_valid() ); EdoTypeKey bad; cout << bad << endl; assert( ! bad.is_valid() ); assert( ! bad.type().is_valid() ); assert( ! bad.key().is_valid() ); cout << line << endl; EdoTypeKey x11(typ1,key1); cout << x11 << endl; assert( x11.is_valid() ); assert( x11.type().is_valid() ); assert( x11.key().is_valid() ); assert( x11.type() == typ1 ); assert( x11.key() == key1 ); cout << line << endl; EdoTypeKey x12(typ1,key2); EdoTypeKey x21(typ2,key1); EdoTypeKey x22(typ2,key2); assert( x11 < x21 ); assert( x11 < x12 ); assert( x11 < x22 ); cout << line << endl; EdoTypeKey x3(typ1,key1); EdoTypeKey x4 = x11; assert( x3 == x11 ); assert( x12 != x11 ); assert( x21 != x11 ); assert( x22 != x11 ); assert( x3 == x11 ); assert( x4 == x11 ); cout << line << endl; return 0; }