mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 22:08:41 +00:00
add non-pure dynamic inheritance case
This commit is contained in:
@@ -1132,6 +1132,25 @@ struct PureChild : Pure
|
|||||||
double a = 0;
|
double a = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Base
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int z;
|
||||||
|
virtual ~Base() = default;
|
||||||
|
virtual void Foo() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Derived : Base
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
int g;
|
||||||
|
int b;
|
||||||
|
int a;
|
||||||
|
virtual ~Derived() = default;
|
||||||
|
virtual void Foo() {a += 1;}
|
||||||
|
};
|
||||||
|
|
||||||
struct OverloadedMethods{
|
struct OverloadedMethods{
|
||||||
int x;
|
int x;
|
||||||
int cool_method(void){
|
int cool_method(void){
|
||||||
@@ -1342,6 +1361,12 @@ extended_type_coverage_eval_tests(void){
|
|||||||
child->Foo();
|
child->Foo();
|
||||||
delete child;
|
delete child;
|
||||||
|
|
||||||
|
Base *derived = new Derived();
|
||||||
|
derived->Foo();
|
||||||
|
derived->Foo();
|
||||||
|
derived->Foo();
|
||||||
|
delete derived;
|
||||||
|
|
||||||
OverloadedMethods overloaded_methods;
|
OverloadedMethods overloaded_methods;
|
||||||
{
|
{
|
||||||
overloaded_methods.x = 0;
|
overloaded_methods.x = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user