提交 dbe9da42 编写于 作者: 杜庆泉's avatar 杜庆泉

add >>> test case #17838

上级 85be09c6
...@@ -338,6 +338,10 @@ export function testOperators(): Result { ...@@ -338,6 +338,10 @@ export function testOperators(): Result {
const c: number = -5; // 11111111111111111111111111111011 const c: number = -5; // 11111111111111111111111111111011
expect(a >>> b).toEqual(1); // 00000000000000000000000000000001 expect(a >>> b).toEqual(1); // 00000000000000000000000000000001
// expect(c >>> b).toEqual(1073741822); // 00111111111111111111111111111110 // expect(c >>> b).toEqual(1073741822); // 00111111111111111111111111111110
const t1l = 3055341859 //这里安卓端默认number就无法正常运算了
const t2l = t1l >>> 0
expect(t1l).toEqual(3055341859);
expect(t2l).toEqual(3055341859);
}) })
test('>>>=', () => { test('>>>=', () => {
let a = 5; // 00000000000000000000000000000101 let a = 5; // 00000000000000000000000000000101
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册