mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
- base64 builtins - base64url builtins - jsonschema builtins - json.remove builtin - handle composite index variables - use dashu_float since rust_decimal has lesser precision Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
50 lines
871 B
YAML
50 lines
871 B
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
cases:
|
|
- note: div
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
import future.keywords.if
|
|
|
|
# Undefined
|
|
y if false
|
|
b = y / 1
|
|
c = 1 / y
|
|
d = 15.3 / 3
|
|
e = 13 / 4
|
|
|
|
|
|
|
|
z {
|
|
x = 1/3
|
|
y = 0.3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333
|
|
x == y
|
|
}
|
|
query: data.test
|
|
want_result:
|
|
d: 5.1
|
|
e: 3.25
|
|
z: true
|
|
|
|
- note: non-numeric
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
x = "1" / 9
|
|
query: data.test.x
|
|
error: "`div` expects numeric argument."
|
|
|
|
- note: div by zero
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
a = 1/ 0
|
|
query: data.test
|
|
error: divide by zero
|