Espruino/tests/test_in_place_bit_shift.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

18 lines
163 B
JavaScript

// in-place shift
var a = 1;
var tests = [
a<<=1 == 2,
a<<=5 == 64,
a>>=1 == 32,
a>>>=1 == 16,
];
result = 1;
for (i in tests)
if (!tests[i])
result=0;