Espruino/tests/test_bitshifting.js
Michael Duerinckx 7f5308590b Rename numbered tests to something more descriptive - closes #16
test077 is the only one I really couldn't figure out what it was meant
to test.
2014-03-01 22:15:28 +00:00

6 lines
123 B
JavaScript

// test for shift
var a = (2<<2);
var b = (16>>3);
var c = ((-1&0xFFFFFFFF) >>> 16);
result = a==8 && b==2 && c == 0xFFFF;