mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
33 lines
573 B
YAML
33 lines
573 B
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
cases:
|
|
- note: div
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
import future.keywords.if
|
|
|
|
x = 1/3
|
|
|
|
# Undefined
|
|
y if false
|
|
a = 1 / 0
|
|
b = y / 1
|
|
c = 1 / y
|
|
d = 13.3 % 3
|
|
e = 13 % 3.1
|
|
query: data.test
|
|
want_result:
|
|
x: 0.3333333333333333
|
|
|
|
- note: non-numeric
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
x = "1" / 9
|
|
query: data.test.x
|
|
error: "`div` expects numeric argument."
|