Files
regorus/tests/interpreter/cases/builtins/bitwise/negate.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

41 lines
786 B
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: bits.negate.error.wrongtype
data: {}
modules:
- |
package test
x = bits.negate("str")
query: data.test
error: "`bits.negate` expects numeric argument. Got `\"str\"` instead"
- note: bits.negate.error.morearg
data: {}
modules:
- |
package test
x = bits.negate(1, 1)
query: data.test
error: "`bits.negate` expects 1 argument"
- note: bits.negate
data: {}
modules:
- |
package test
x1 = bits.negate(1)
x2 = bits.negate(0)
x3 = bits.negate(9)
x4 = bits.negate(-50)
query: data.test
want_result:
x1 : -2
x2 : -1
x3 : -10
x4 : 49