mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
36 lines
661 B
YAML
36 lines
661 B
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
cases:
|
|
- note: abs
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
x = [abs(-9), abs(9), abs(-9.1), abs(9.1)]
|
|
|
|
# Undefined
|
|
y { false }
|
|
z = abs(y)
|
|
query: data.test
|
|
want_result:
|
|
x: [9, 9, 9.1, 9.1]
|
|
|
|
- note: extra-args
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
x = abs(-9, 10)
|
|
query: data.test.x
|
|
error: "`abs` expects 1 argument"
|
|
|
|
- note: invalid-type
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
x = abs("-9")
|
|
query: data.test.x
|
|
error: "`abs` expects numeric argument"
|