Browse Source

Test NULL-coalescing operator.

release/v0.1
Rafal Kupiec 2 years ago
parent
commit
8ee2dece06
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
2 changed files with 24 additions and 0 deletions
  1. +15
    -0
      tests/null_coalescing.aer
  2. +9
    -0
      tests/null_coalescing.exp

+ 15
- 0
tests/null_coalescing.aer View File

@ -0,0 +1,15 @@
class Program {
public void main() {
var_dump(0 ?? 0 ?? 6);
var_dump(0 ?? (0 ?? 6));
var_dump((0 ?? 0) ?? 6);
var_dump(0 ?? 5 ?? 6);
var_dump(0 ?? (5 ?? 6));
var_dump((0 ?? 5) ?? 6);
var_dump(4 ?? 5 ?? 6);
var_dump(4 ?? (5 ?? 6));
var_dump((4 ?? 5) ?? 6);
}
}

+ 9
- 0
tests/null_coalescing.exp View File

@ -0,0 +1,9 @@
int(6)
int(6)
int(6)
int(5)
int(5)
int(5)
int(4)
int(4)
int(4)

Loading…
Cancel
Save