X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=tests%2Foperators.qc;h=1ca6f67caa0e5cf56ecf2516b82f487af3ba750d;hb=3c003bc168fe47f3e7ce08328782f969b59d89a3;hp=e440ec54d77ca1b322ac1abfe6ada7506d193b98;hpb=553f3df5df05d11cc4c6a1f2cceb18b18452704d;p=xonotic%2Fgmqcc.git diff --git a/tests/operators.qc b/tests/operators.qc index e440ec5..1ca6f67 100644 --- a/tests/operators.qc +++ b/tests/operators.qc @@ -51,4 +51,12 @@ void main() { v = '3 4 5'; print(vtos(v *= 2), " = '6 8 10'\n"); print(vtos(v /= 2), " = '3 4 5'\n"); + + // bit compounds + a = 1; + print(ftos(a |= 2), " = 3\n"); + print(ftos(a &= 6), " = 2\n"); + a = 7; + + print(ftos(a &~= 3), " = 4\n"); }