From 013a59e06236c988347787d1ab0d40d890b174a3 Mon Sep 17 00:00:00 2001 From: Anand Thakker Date: Mon, 19 Jun 2017 21:13:45 -0400 Subject: [PATCH] Add test for operator precedence issue --- .../case/precedence/test.json | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/integration/expression-tests/case/precedence/test.json diff --git a/test/integration/expression-tests/case/precedence/test.json b/test/integration/expression-tests/case/precedence/test.json new file mode 100644 index 00000000000..9e67cc0e16d --- /dev/null +++ b/test/integration/expression-tests/case/precedence/test.json @@ -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 + ] + } +}