]> de.git.xonotic.org Git - voretournament/voretournament.git/blob - misc/source/gmqcc-src/tests/truth.qc
By fteqcc, hello gmqcc
[voretournament/voretournament.git] / misc / source / gmqcc-src / tests / truth.qc
1 void test(string s) {
2     print(ftos(!s));
3     if (s)   print(" on");
4     if (!s)  print(" off");
5     if (!!s) print(" !!on");
6     print("\n");
7 }
8
9 void test2(string s) {
10     print(ftos(!s));
11     while (s)   { print(" on");   break; }
12     while (!s)  { print(" off");  break; }
13     while (!!s) { print(" !!on"); break; }
14     print("\n");
15 }
16
17 string str_nul;
18
19 void main(vector v) {
20     test("foo");
21     test2("foo");
22     test("");
23     test2("");
24     test(str_nul);
25     test2(str_nul);
26 }