Files
regorus/tests/parser/cases/expressions/bool.yaml
Ming-Wei Shih c0972ad2ba Update license to MIT
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
2023-02-09 19:40:35 +00:00

44 lines
1.0 KiB
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic
rego: |
package test
# bool ops have lower precedence than arithmetic operators
x = 1 + 2 > 3 - 2
# TODO: lock down
# different types against object
# different types against set
# strings etc
policy:
- spec:
head:
compr:
refr:
var: x
assign:
op: =
value:
boolexpr:
op: ">"
lhs:
arithexpr:
op: "+"
lhs:
number: 1
rhs:
number: 2
rhs:
arithexpr:
op: "-"
lhs:
number: 3
rhs:
number: 2
bodies: []