mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-30 15:41:12 +00:00
27 lines
628 B
C++
27 lines
628 B
C++
void print(...) = #1;
|
|
string ftos (float) = #2;
|
|
|
|
void test(float cond, float v1, float v2, float a) {
|
|
print(ftos(cond ? v1 : v2), " ");
|
|
print( (cond ? v1 : v2) ? ( (a == 1) ? "a=1"
|
|
: (a == 2) ? "a=2"
|
|
: "a=other"
|
|
)
|
|
: "not met",
|
|
"\n");
|
|
}
|
|
|
|
void main() {
|
|
test(0, -99, 1, 1);
|
|
test(0, -99, 1, 2);
|
|
test(0, -99, 1, 3);
|
|
test(0, -99, 0, 1);
|
|
test(0, -99, 0, 2);
|
|
test(0, -99, 0, 3);
|
|
test(1, 1, -99, 1);
|
|
test(1, 1, -99, 2);
|
|
test(1, 1, -99, 3);
|
|
test(1, 0, -99, 1);
|
|
test(1, 0, -99, 2);
|
|
test(1, 0, -99, 3);
|
|
}
|