Operators unittests

This commit is contained in:
Jason Turner
2009-11-11 03:03:24 +00:00
parent e14931f389
commit 07352a16a3
4 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
var i = 1;
var j = 2;
var k = 3;
print(i + j);
print(+i);
print(i - j);
print(-i);
print(j & k);
print(~j);
print(j ^ k);
print(i | j);
print(j / i);
print(i << j);
print(j * k);
print(k % j);
print(j >> i);
print(i &= 2);
print(j ^= 3);
print(j |= 2);
print(i -= 1);
print(j <<= 1);
print(j *= 2);
print(j /= 2);
print(j %= 4);
print(j >>= 1);
print(j += 1);
print(--j);
print(++j);