Files
regorus/tests/interpreter/cases/arithmetic/tests.yaml
Anand Krishnamoorthi e549882b07 More OPA conformance (#77)
- object.union
- object.union_n
- treat negative integers as two separate tokens (Sub and Number)
  when seen in arithmetic expressions
- Ensure that fully query string is parsed
- Evaluate queries in a separate module instead of the last read module.
  This correctly handles queries of the form `x = data.test.y` where x is
  already a ref in `data.test`
- Handle queries producing multiple outputs in test infrastructure
- Add tests for engine
- Add tests locking down valid queries
- Update opa.passing

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-12-27 17:00:40 -08:00

22 lines
508 B
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: negative-integer-literal-in-arithmetic-expressions
data: {}
modules:
- |
# In the following, the negative integer must be broken into a - and an integer tokens
# when in arighmetic expression contexts
package test
a = 1+1-1
b = 1 +1 -1
c = 1 + 1 - 1
d = -1 -1
query: data.test
want_result:
a: 1
b: 1
c: 1
d: -2