gcc/libvtv/testsuite/libvtv.cc/nested_vcall_test.cc
Caroline Tice 41e96dc8f0 Update libvtv testsuite so that most of the tests now run under
the dejagnu test harness.

From-SVN: r202373
2013-09-08 16:35:14 -07:00

78 lines
1.1 KiB
C++

// { dg-do run }
class EtherCtrl {
protected:
int ssap;
public:
EtherCtrl(void);
~EtherCtrl();
virtual int getSsap(void) const;
virtual void setSsap(int);
};
class EtherFrameWithLLC {
protected:
int ssap;
public:
EtherFrameWithLLC(const char *, int);
~EtherFrameWithLLC();
virtual int getSsap(void) const;
virtual void setSsap(int);
};
EtherCtrl::EtherCtrl()
{
this->ssap = 0;
}
EtherCtrl::~EtherCtrl()
{
}
int EtherCtrl::getSsap() const
{
return ssap;
}
void EtherCtrl::setSsap(int ssap)
{
this->ssap = ssap;
}
EtherFrameWithLLC::EtherFrameWithLLC(const char *name, int kind)
{
this->ssap = 0;
}
EtherFrameWithLLC::~EtherFrameWithLLC()
{
}
int EtherFrameWithLLC::getSsap() const
{
return ssap;
}
void EtherFrameWithLLC::setSsap(int ssap)
{
this->ssap = ssap;
}
int
main (int argc, char **argv)
{
EtherCtrl *etherctrl = new EtherCtrl ();
EtherFrameWithLLC *frame = new EtherFrameWithLLC ("test", 10);
int my_value;
etherctrl->setSsap(43);
frame->setSsap(etherctrl->getSsap());
my_value = frame->getSsap();
return 0;
}