mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
61 lines
1.1 KiB
YAML
61 lines
1.1 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
cases:
|
|
- note: bits.or.error.wrongtype1
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
x = bits.or(1, "str")
|
|
query: data.test
|
|
error: "`bits.or` expects numeric argument. Got `\"str\"` instead"
|
|
|
|
- note: bits.or.error.wrongtype2
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
x = bits.or("str", 1)
|
|
query: data.test
|
|
error: "`bits.or` expects numeric argument. Got `\"str\"` instead"
|
|
|
|
- note: bits.or.error.morearg
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
x = bits.or(1, 1, 1)
|
|
query: data.test
|
|
error: "`bits.or` expects 2 arguments"
|
|
|
|
- note: bits.or.error.lessarg
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
x = bits.or(1)
|
|
query: data.test
|
|
error: "`bits.or` expects 2 arguments"
|
|
|
|
- note: bits.or
|
|
data: {}
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
x1 = bits.or(1, 0)
|
|
x2 = bits.or(1, 1)
|
|
x3 = bits.or(0, 0)
|
|
x4 = bits.or(0, 1)
|
|
query: data.test
|
|
want_result:
|
|
x1 : 1
|
|
x2 : 1
|
|
x3 : 0
|
|
x4 : 1
|