vm: redefine SHL/SHR limits based on integer size
This commit is contained in:
parent
439cd72294
commit
816d78b5ee
2 changed files with 4 additions and 4 deletions
|
@ -624,7 +624,7 @@ func TestSHRSmallValue(t *testing.T) {
|
|||
prog := makeProgram(SHR)
|
||||
vm := load(prog)
|
||||
vm.estack.PushVal(5)
|
||||
vm.estack.PushVal(-257)
|
||||
vm.estack.PushVal(minSHLArg - 1)
|
||||
checkVMFailed(t, vm)
|
||||
}
|
||||
|
||||
|
@ -660,7 +660,7 @@ func TestSHLBigValue(t *testing.T) {
|
|||
prog := makeProgram(SHL)
|
||||
vm := load(prog)
|
||||
vm.estack.PushVal(5)
|
||||
vm.estack.PushVal(257)
|
||||
vm.estack.PushVal(maxSHLArg + 1)
|
||||
checkVMFailed(t, vm)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue