Browse Source

Extend this test.

release/v0.1
Rafal Kupiec 3 years ago
parent
commit
76880ae4e2
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
  1. 29
      tests/entry_point.aer
  2. 8
      tests/entry_point.exp

29
tests/entry_point.aer

@ -1,7 +1,35 @@
class Test1 {
void __construct() {
print("Test1::__construct() called.\n");
}
void __destruct() {
print("Test1::__destruct() called.\n");
}
}
class Test2 extends Test1 {
void __construct() {
print("Test2::__construct() called.\n");
$parent->__construct();
}
void __destruct() {
print("Test2::__destruct() called.\n");
$parent->__destruct();
}
}
class Program {
object $test;
void __construct() {
print("Program::__construct() called.\n");
$this->test = new Test1();
}
void __destruct() {
@ -10,6 +38,7 @@ class Program {
void main() {
print("Program::main() called.\n");
object $test = new Test2();
}
}

8
tests/entry_point.exp

@ -1,3 +1,9 @@
Program::__construct() called.
Test1::__construct() called.
Program::main() called.
Program::__destruct() called.
Test2::__construct() called.
Test1::__construct() called.
Program::__destruct() called.
Test1::__destruct() called.
Test2::__destruct() called.
Test1::__destruct() called.

Loading…
Cancel
Save