first commit
This commit is contained in:
commit
063194f8be
349 changed files with 36508 additions and 0 deletions
33
tester/testsuite/good/core013.jl
Normal file
33
tester/testsuite/good/core013.jl
Normal file
|
@ -0,0 +1,33 @@
|
|||
/* Test boolean operators. */
|
||||
|
||||
int main() {
|
||||
printString("&&");
|
||||
printBool(test(-1) && test(0));
|
||||
printBool(test(-2) && test(1));
|
||||
printBool(test(3) && test(-5));
|
||||
printBool(test(234234) && test(21321));
|
||||
printString("||");
|
||||
printBool(test(-1) || test(0));
|
||||
printBool(test(-2) || test(1));
|
||||
printBool(test(3) || test(-5));
|
||||
printBool(test(234234) || test(21321));
|
||||
printString("!");
|
||||
printBool(true);
|
||||
printBool(false);
|
||||
return 0 ;
|
||||
|
||||
}
|
||||
|
||||
void printBool(boolean b) {
|
||||
if (!b) {
|
||||
printString("false");
|
||||
} else {
|
||||
printString("true");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
boolean test(int i) {
|
||||
printInt(i);
|
||||
return i > 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue