Files
regorus/tests/interpreter/cases/builtins/bitwise/or.yaml
eric-therond e08d13df53 fix bitwise.and and add tests (#19)
Signed-off-by: eric-therond <eric.therond.fr@gmail.com>
2023-06-22 11:27:58 -07:00

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