badvpn/ncd/tests/logical.ncd
2012-08-06 23:27:08 +00:00

47 lines
648 B
Plaintext

process main {
var("true") t;
var("Faalse") f;
and(t, f) r;
strcmp(r, "false") a;
assert(a);
and(f, t) r;
strcmp(r, "false") a;
assert(a);
and(f, f) r;
strcmp(r, "false") a;
assert(a);
and(t, t) r;
strcmp(r, "true") a;
assert(a);
or(t, f) r;
strcmp(r, "true") a;
assert(a);
or(f, t) r;
strcmp(r, "true") a;
assert(a);
or(t, t) r;
strcmp(r, "true") a;
assert(a);
or(f, f) r;
strcmp(r, "false") a;
assert(a);
not(f) r;
strcmp(r, "true") a;
assert(a);
not(t) r;
strcmp(r, "false") a;
assert(a);
exit("0");
}