%description: Test the check_and_cast() function. %activity: // create a cPacket as cMessage cOwnedObject *msg = new cMessage(); // following ones should work cMessage *p1 = check_and_cast(msg); cOwnedObject *p2 = check_and_cast(msg); cObject *p3 = check_and_cast(msg); EV << (p1!=nullptr) << endl; EV << (p2!=nullptr) << endl; EV << (p3!=nullptr) << endl; %contains: stdout 1 1 1