]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - tests/operators.qc
Merge branch 'cooking' of github.com:graphitemaster/gmqcc into cooking
[xonotic/gmqcc.git] / tests / operators.qc
index e440ec54d77ca1b322ac1abfe6ada7506d193b98..46bd6bbeb81c2268edb8de30f86f74e18fad9b32 100644 (file)
@@ -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");
 }