]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/correct-vs-short.qc
Fix for loops
[xonotic/gmqcc.git] / tests / correct-vs-short.qc
1 void test(vector a, vector b) {
2     print(ftos((a && b) + (a && b)), " ");
3     print(ftos((a || b) + (a || b)), " ");
4     print(ftos((a && b) + (a || b)), "\n");
5 }
6
7 void main() {
8     print("X               & | B\n");
9     print("0 0 0, 0 0 0 :: "); test('0 0 0', '0 0 0');
10     print("0 0 0, 5 0 0 :: "); test('0 0 0', '5 0 0');
11     print("5 0 0, 0 0 0 :: "); test('5 0 0', '0 0 0');
12     print("5 0 0, 5 0 0 :: "); test('5 0 0', '5 0 0');
13     print("Y               & | B\n");
14     print("0 0 0, 0 0 0 :: "); test('0 0 0', '0 0 0');
15     print("0 0 0, 0 5 0 :: "); test('0 0 0', '0 5 0');
16     print("0 5 0, 0 0 0 :: "); test('0 5 0', '0 0 0');
17     print("0 5 0, 0 5 0 :: "); test('0 5 0', '0 5 0');
18 }