systemtap/tests/Regression/RHEL6Feature-cpp-inheritance/classes.cpp
Martin Cermak 8d5d041590 Include downstream/RHEL tests
Find new home for downstream RHEL tests.  Upstream them.  The set of
tests used for fedora gating stays intact:  The gating tests are only
those having the tier1 tag set in their main.fmf file.  The testplan
plans/ci.fmf filters the others out from gating.

The set of Fedora gating tests stays the same as it was before this
change.
2022-05-10 09:56:18 +02:00

57 lines
857 B
C++

#include <iostream>
class A{
public:
void one(){ std::cout << "A::one" << std::endl; }
void two(){ std::cout << "A::two" << std::endl; }
virtual void three() { std::cout << "A::three" << std::endl; }
virtual void four() { std::cout << "A::four" << std::endl; }
};
class B : public A{
public:
void one() { std::cout << "B::one" << std::endl; }
int one(int a) { std::cout << "B::one" << std::endl; }
virtual void three() { std::cout << "B::three" << std::endl; }
};
int main(){
A a;
B b;
A *ap = new A();
A *apb = new B();
B *bp = new B();
a.one();
a.two();
a.three();
a.four();
b.one();
b.two();
b.three();
b.four();
ap->one();
ap->two();
ap->three();
ap->four();
apb->one();
apb->two();
apb->three();
apb->four();
bp->one();
bp->two();
bp->three();
bp->four();
return 0;
}