Add more tests.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-02-05 19:48:38 +01:00
parent ff9e38a480
commit ed8dab7870
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
4 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,15 @@
class Program {
function main(string[] $args) {
callback $y = function() {
callback $a = 'printf';
$a("I'm alive\n");
var_dump($a);
};
$y();
var_dump($y);
string $a = 'printf';
var_dump($a);
}
}

View File

@ -0,0 +1,4 @@
I'm alive
callback(6 'printf')
callback(11 '{closure_1}')
string(6 'printf')

13
tests/reference_test.aer Normal file
View File

@ -0,0 +1,13 @@
class Program {
function add_by_ref(int &$val) {
$val += 7;
}
function main() {
int $num = 7;
$this->add_by_ref($num);
var_dump($num);
}
}

1
tests/reference_test.exp Normal file
View File

@ -0,0 +1 @@
int(14)