X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=tests%2Foperators.qc;h=46bd6bbeb81c2268edb8de30f86f74e18fad9b32;hp=e440ec54d77ca1b322ac1abfe6ada7506d193b98;hb=1077eb20617f8df758baf17951f3594270ebd0c1;hpb=553f3df5df05d11cc4c6a1f2cceb18b18452704d diff --git a/tests/operators.qc b/tests/operators.qc index e440ec5..46bd6bb 100644 --- a/tests/operators.qc +++ b/tests/operators.qc @@ -1,8 +1,3 @@ -void print(...) = #1; -string ftos (float) = #2; -string vtos (vector) = #5; -entity spawn() = #3; - .float mem; void main() { @@ -51,4 +46,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"); }