Browse Source

Check switch block.

pull/50/head
Rafal Kupiec 1 year ago
parent
commit
725b60cb88
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
2 changed files with 22 additions and 0 deletions
  1. +20
    -0
      tests/switch_block.aer
  2. +2
    -0
      tests/switch_block.exp

+ 20
- 0
tests/switch_block.aer View File

@ -0,0 +1,20 @@
class Program {
void main() {
int $a = 1;
switch($a) {
case 0:
print("very bad\n");
break;
case 1:
print("very good\n");
case 2:
print("good\n");
break;
default:
print("bad");
break;
}
}
}

+ 2
- 0
tests/switch_block.exp View File

@ -0,0 +1,2 @@
very good
good

Loading…
Cancel
Save