-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for operator precedence issue
- Loading branch information
Anand Thakker
committed
Jun 20, 2017
1 parent
85966e1
commit 013a59e
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
test/integration/expression-tests/case/precedence/test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"metadata": { | ||
"test": { | ||
"description": "Regression test for operator precedence: false && (true ? true : true) !== (false && true) ? true: true" | ||
} | ||
}, | ||
"expression": [ | ||
"boolean", | ||
[ | ||
"&&", | ||
false, | ||
[ | ||
"case", | ||
true, | ||
true, | ||
true | ||
] | ||
] | ||
], | ||
"evaluate": [ | ||
[ | ||
{}, | ||
{} | ||
] | ||
], | ||
"expected": { | ||
"compileResult": { | ||
"result": "success", | ||
"isFeatureConstant": true, | ||
"isZoomConstant": true, | ||
"type": "boolean" | ||
}, | ||
"evaluateResults": [ | ||
false | ||
] | ||
} | ||
} |