Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippImhof committed Mar 29, 2023
1 parent b994077 commit a6057fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/evaluator_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ public function provide_assignments(): array {
'constant' => ['a,1,=', 'a = 1'],
'arithmetic expression' => ['a,1,2,3,*,+,=', 'a = 1+2*3'],
'arithmetic expression with ternary in parens' => [
'a,5,b,1,==,?,3,:,4,%%ternary,2,*,+,=',
'a,5,b,1,==,3,4,%%ternary,2,*,+,=',
'a = 5 + (b == 1 ? 3 : 4) * 2'
],
'arithmetic expression with double ternary' => [
'a,b,c,==,?,1,:,b,d,==,?,2,:,0,%%ternary,%%ternary,=',
'a,b,c,==,1,b,d,==,2,0,%%ternary,%%ternary,=',
'a = b == c ? 1 : b == d ? 2 : 0'
],
'arithmetic expression with paren and power' => ['a,3,4,**,5,**,=', 'a = (3**4)**5'],
Expand Down
4 changes: 2 additions & 2 deletions tests/parser_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ public function provide_assignments(): array {
'constant' => ['a,1,=', 'a = 1'],
'arithmetic expression' => ['a,1,2,3,*,+,=', 'a = 1+2*3'],
'arithmetic expression with ternary in parens' => [
'a,5,b,1,==,?,3,:,4,%%ternary,2,*,+,=',
'a,5,b,1,==,3,4,%%ternary,2,*,+,=',
'a = 5 + (b == 1 ? 3 : 4) * 2'
],
'arithmetic expression with double ternary' => [
'a,b,c,==,?,1,:,b,d,==,?,2,:,0,%%ternary,%%ternary,=',
'a,b,c,==,1,b,d,==,2,0,%%ternary,%%ternary,=',
'a = b == c ? 1 : b == d ? 2 : 0'
],
'arithmetic expression with paren and power' => ['a,3,4,**,5,**,=', 'a = (3**4)**5'],
Expand Down

0 comments on commit a6057fb

Please sign in to comment.