mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
- emit AssertCondition for equality-only assignment plans (outside soft-assert mode) so rules like `0 = 1` fail under the VM just like the interpreter - let comprehension bodies consume assertion failures by advancing or exiting their iteration context, both in run-to-completion and suspendable execution Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
26 lines
581 B
YAML
26 lines
581 B
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
# Arithmetic Operations Test Suite
|
|
# Tests basic arithmetic operations: addition, multiplication, division, subtraction
|
|
|
|
cases:
|
|
- note: comprehension_basic
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
main := [(x * 2) | some x in [1, 2, 3]]
|
|
query: data.test.main
|
|
want_result: [2, 4, 6]
|
|
|
|
- note: comprehension_equality_failure_returns_empty
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
z := [x | x := 1; x == 2]
|
|
query: data.test.z
|
|
want_result: []
|