mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
27 lines
472 B
YAML
27 lines
472 B
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
cases:
|
|
- note: add
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
x = 3 + -1 + 4.5
|
|
# Undefined
|
|
y { false }
|
|
a = 1 + y
|
|
b = y + 1
|
|
query: data.test
|
|
want_result:
|
|
x: 6.5
|
|
|
|
- note: non-numeric
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
x = "1" + 9
|
|
query: data.test.x
|
|
error: "`add` expects numeric argument."
|