Fix runtime error: left shift (#4912)

This patch fixes #4703
This patch fixes #4702

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
This commit is contained in:
batizdaniel
2021-12-23 11:33:21 +01:00
committed by GitHub
parent a63e1d294d
commit a6ab5e9abe
3 changed files with 18 additions and 3 deletions
+12
View File
@@ -14,6 +14,18 @@
assert((9 << 2) === 36);
assert((14 << 2) === 56);
assert((0 << 0) === 0);
assert((0 << 1) === 0);
assert((0 << -1) === 0);
assert((1 << 0) === 1);
assert((1 << 1) === 2);
assert((-1 << 0) === -1);
assert((-1 << 1) === -2);
assert((1024 << 21) === -2147483648);
assert((10 << -1) === 0);
assert((33554431 << 22) === -4194304);
assert((-1024 << 31) === 0);
assert((1024 << 53) === -2147483648);
assert((9 >> 2) === 2);
assert((-14 >> 2) === -4);