Skip to content

Commit

Permalink
Test vptr too
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Aug 3, 2018
1 parent 0a45eab commit a4578fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/runnable/cppa.d
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ class Base19134
{
int a = 123;
this() { a += 42; }
void foo() {}
int foo() { return a; }
}

class Derived19134 : Base19134
Expand All @@ -1531,13 +1531,15 @@ class Derived19134 : Base19134
a *= 2;
b -= 6;
}
override int foo() { return b; }
}

void test19134()
{
static const d = new Derived19134;
assert(d.a == (123 + 42) * 2);
assert(d.b == 666 - 6);
assert(d.foo() == 660);
}

/****************************************/
Expand Down

0 comments on commit a4578fb

Please sign in to comment.