Commit Graph

6 Commits

Author SHA1 Message Date
Elijah Koulaxis
0e5fe9b9ac feat: add tests for number semantics (#555) 2026-01-31 07:27:51 +05:30
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
Anand Krishnamoorthi
2436467fbd Minimize PR 22 (#26)
* specific functions added to eval different rego components

Signed-off-by: eric-therond <eric.therond.fr@gmail.com>

* allow multiple inputs and results

Signed-off-by: eric-therond <eric.therond.fr@gmail.com>

* prepare_for_eval is necessary to be called

Signed-off-by: eric-therond <eric.therond.fr@gmail.com>

* test with the suggested code examples and clean scopes

Signed-off-by: eric-therond <eric.therond.fr@gmail.com>

* try to refactor first steps of evaluations

Signed-off-by: eric-therond <eric.therond.fr@gmail.com>

* improve coverage and fix clean state internal evaluation

Signed-off-by: eric-therond <eric.therond.fr@gmail.com>

* add getters and setters and fix clean function

Signed-off-by: eric-therond <eric.therond.fr@gmail.com>

* Tests are single input by default. Multi input specified via "many!" marker.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>

---------

Signed-off-by: eric-therond <eric.therond.fr@gmail.com>
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Co-authored-by: eric-therond <eric.therond.fr@gmail.com>
2023-10-09 14:27:31 -07:00
Anand Krishnamoorthi
112623c762 tracing::trace builtin
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-03-05 16:39:42 +05:30
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
Anand Krishnamoorthi
cb0b3a1790 Code from github.com/anakrish/rego-rs
Authored by anakrish and mingweishih

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-02-09 10:56:54 -08:00